Skip to content

Update js-yaml to 4.3.1 to resolve Dependabot security alert #52 #1515

Description

@pedrazamiguez

Problem / Motivation

  • Dependabot has reported a high-severity security vulnerability in the js-yaml dependency (GHSA-5p4m-2wfm-xmqj) located in functions/package-lock.json.
  • Versions of js-yaml between 4.0.0 and 4.3.0 suffer from quadratic CPU consumption in !!omap resolution, which can block the Node.js event loop and lead to a Denial of Service (DoS) when parsing untrusted YAML.
  • Resolving this is necessary to ensure the security and availability of the functions backend and to clear Dependabot alert Expense automatically updates group summary #52.

Proposed Solution

  • Update the js-yaml dependency to the patched version (4.3.1) in the functions directory.
  • Regenerate the functions/package-lock.json to reflect the updated transitive or direct dependency.
  • Verify that the update does not introduce breaking changes or compatibility issues with existing code in the functions module.

Acceptance Criteria

  • The js-yaml dependency in functions/package-lock.json is updated to at least version 4.3.1.
  • All existing tests pass; new tests added where behaviour changes.
  • make fast-check passes during iterative development (~15–30s).
  • make check > build.log 2>&1 && echo "Check passed successfully" || (tail -n 100 build.log && exit 1) passes with 0 failures before merging.
  • No new detekt findings introduced.

Out of Scope

  • Major version upgrades of js-yaml (e.g., to 5.x) or other dependencies unrelated to this specific alert, unless strictly necessary for compatibility.
  • Any refactoring outside of the functions module.

Related Issues / PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    configProject configuration

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions