Skip to content

Remediate GHSA-grv7-fg5c-xmjg by pinning transitive braces to 3.0.3 in plugin-hrm-form - #4681

Merged
stephenhand merged 2 commits into
masterfrom
copilot/fix-uncontrolled-resource-consumption
Sep 9, 2026
Merged

Remediate GHSA-grv7-fg5c-xmjg by pinning transitive braces to 3.0.3 in plugin-hrm-form#4681
stephenhand merged 2 commits into
masterfrom
copilot/fix-uncontrolled-resource-consumption

Conversation

Copilot AI commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Description

Resolved a high-severity Dependabot alert for uncontrolled resource consumption in braces (CVE-2024-4068 / GHSA-grv7-fg5c-xmjg) under plugin-hrm-form/package-lock.json. The dependency graph now resolves braces to the lowest patched version (3.0.3) with a minimal, scoped change.

  • Dependency remediation

    • Added an npm override in plugin-hrm-form/package.json to force braces to 3.0.3.
    • Regenerated plugin-hrm-form/package-lock.json via npm tooling so transitive braces@2.3.2 resolutions are removed.
  • Reachability assessment

    • Advisory impact is tied to braces parsing imbalanced brace patterns.
    • No direct braces/micromatch imports or call sites were found in plugin-hrm-form application source; usage is transitive through tooling dependencies.
    • Exposure is therefore primarily supply-chain/scanner-driven rather than an identified app-runtime call path.
    • Confidence: High.
{
  "overrides": {
    "braces": "3.0.3"
  }
}

Checklist

  • Corresponding issue has been opened
  • New tests added
  • Feature flags added
  • Strings are localized
  • Tested for chat contacts
  • Tested for call contacts

Other Related Issues

None

Verification steps

  • From plugin-hrm-form, confirm resolved version:
    • npm ls braces
  • Confirm lockfile no longer resolves vulnerable braces@2.3.2 package entries:
    • inspect plugin-hrm-form/package-lock.json for node_modules/braces resolving to 3.0.3

AFTER YOU MERGE

  1. Cut a release tag using the Github workflow. Wait for it to complete and notify in the #aselo-deploys Slack channel.
  2. Comment on the ticket with the release tag version AND any additional instructions required to configure an environment to test the changes.
  3. Only then move the ticket into the QA column in JIRA

You are responsible for ensuring the above steps are completed. If you move a ticket into QA without advising what version to test, the QA team will assume the latest tag has the changes. If it does not, the following confusion is on you! :-P

Original prompt

This section details the Dependabot vulnerability alert you should resolve

<alert_title>Uncontrolled resource consumption in braces</alert_title>
<alert_description>The NPM package braces fails to limit the number of characters it can handle, which could lead to Memory Exhaustion. In lib/parse.js, if a malicious user sends "imbalanced braces" as input, the parsing will enter a loop, which will cause the program to start allocating heap memory without freeing it at any moment of the loop. Eventually, the JavaScript heap limit is reached, and the program will crash.
</alert_description>

high
GHSA-grv7-fg5c-xmjg, CVE-2024-4068
braces
npm
<vulnerable_versions>2.3.2</vulnerable_versions>
<patched_version>3.0.3</patched_version>
<manifest_path>plugin-hrm-form/package-lock.json</manifest_path>

https://nvd.nist.gov/vuln/detail/CVE-2024-4068 https://github.com/micromatch/braces/issues/35 https://devhub.checkmarx.com/cve-details/CVE-2024-4068 https://github.com/micromatch/braces/blob/98414f9f1fabe021736e26836d8306d5de747e0d/lib/parse.js#L308 https://github.com/micromatch/braces/pull/37 https://github.com/micromatch/braces/pull/40 https://github.com/micromatch/braces/commit/415d660c3002d1ab7e63dbf490c9851da80596ff https://github.com/advisories/GHSA-grv7-fg5c-xmjg

<task_instructions>Resolve this alert by updating the affected package to a non-vulnerable version. Prefer the lowest non-vulnerable version (see the patched_version field above) over the latest to minimize breaking changes. Include a Reachability Assessment section in the PR description. Review the alert_description field to understand which APIs, features, or configurations are affected, then search the codebase for usage of those specific items. If the vulnerable code path is reachable, explain how (which files, APIs, or call sites use the affected functionality) and note that the codebase is actively exposed to this vulnerability. If the vulnerable code path is not reachable, explain why (e.g. the affected API is never called, the vulnerable configuration is not used) and note that the update is primarily to satisfy vulnerability scanners rather than to address an active risk. If the advisory is too vague to determine reachability (e.g. 'improper input validation' with no specific API named), state that reachability could not be determined and explain why. Include a confidence level in the reachability assessment (e.g. high confidence if the advisory names a specific API and you confirmed it is or is not called, low confidence if the usage is indirect and hard to trace). If no patched version is available, check the alert_description field for a Workarounds section — the advisory may describe configuration changes or usage patterns that mitigate the vulnerability without a version update. If a workaround is available, apply it and leave a code comment referencing the advisory identifier explaining it is a temporary mitigation. If neither a patch nor a workaround is available, explain in the PR description why the alert cannot be resolved automatically so a human reviewer can take over. Inspect the repository to determine which package manager is used (e.g. lock files, config files, build scripts) and use that tooling to perform the update — do not edit lock files directly. If the version constraint in the manifest (e.g. package.json, Gemfile, pyproject.toml) caps the version below the fix, update the constraint first. For transitive dependencies, determine whether it is simpler to update the direct dependency that pulls in the vulnerable package or to update the transitive dependency directly, and choose the least disruptive approach. If upgrading to fix the vulnerability forces a major version bump or known breaking changes, review the changelog or release notes, then audit the codebase for usage of affected APIs and fix any breaking changes that are found. If the package manager fails to resolve dependencies (e.g. peer dependency conflicts, incompatible engine constraints), document the error in the PR description rather than attempting increasingly complex workarounds. After updating, check the lock file to confirm the package no longer resolves to a version in the vulnerable range. Keep changes minimal and tightly scoped. Ensure tests, build, type checking, and linting all pass after your changes. If there are any test, lint, or typechecking failures, investigate whether they are caused by the update and fix them if so — do not leave broken tests in the PR. If they were already present before the update, note them in the PR description so a human reviewer can assess whether they are related.</task_instructions>

Co-authored-by: stephenhand <1694716+stephenhand@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix uncontrolled resource consumption in braces package Remediate GHSA-grv7-fg5c-xmjg by pinning transitive braces to 3.0.3 in plugin-hrm-form Sep 9, 2026
Copilot AI requested a review from stephenhand September 9, 2026 13:54
@stephenhand
stephenhand marked this pull request as ready for review September 9, 2026 14:22
Copilot AI lite review requested due to automatic review settings September 9, 2026 14:22
@stephenhand
stephenhand merged commit 4ee23ee into master Sep 9, 2026
25 checks passed
@stephenhand
stephenhand deleted the copilot/fix-uncontrolled-resource-consumption branch September 9, 2026 14:23
Copilot stopped reviewing on behalf of stephenhand due to an error September 9, 2026 14:23

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note

Copilot could not run the full agentic suite for this review because it was automatically requested on a bot-authored pull request. Request a review from Copilot under Reviewers to retry with the full agentic suite. Improved support for bot-authored pull requests is coming soon.

Pull request overview

Updates plugin-hrm-form dependency resolution to pin a specific version of braces via npm overrides.

Changes:

  • Add an overrides entry to force braces to 3.0.3
Files not reviewed (1)
  • plugin-hrm-form/package-lock.json: Generated file

💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants