fix(deps): raise the js-yaml override to the patched 4.x floor - #3894
fix(deps): raise the js-yaml override to the patched 4.x floor#3894Dipak Chaudhari (dchaudhari7177) wants to merge 1 commit into
Conversation
The four CLI packages pin js-yaml to 4.2.0 with an npm `overrides` field, added in the 2026-06-16 audit to clear GHSA-h67p-54hq-rp68. Two later advisories affect that release: GHSA-52cp-r559-cp3m / CVE-2026-59869 (<4.3.0) and GHSA-5p4m-2wfm-xmqj (<4.3.1). Raise the override to 4.3.2, the current patch on the 4.x line. Raising the pin is the fix rather than dropping it: js-yaml is transitive through @microsoft/agent-governance-sdk, and removing the override resolves down to the SDK's own 4.1.1, which is affected by both of these and by the earlier advisory as well. `npm audit --package-lock-only` goes from 2 high severity to 0 in each of the four packages. Refs microsoft#3671.
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
|
Welcome to the Agent Governance Toolkit! Thanks for your first pull request. |
|
🟡 Contributor Check: MEDIUM
Automated check by AGT Contributor Check. |
|
Dipak Chaudhari (@dchaudhari7177) please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.
Contributor License AgreementContribution License AgreementThis Contribution License Agreement (“Agreement”) is agreed to by the party signing below (“You”),
|
PR Review Summary
Verdict: AI review comments are untrusted advisory output. The summary reports workflow-generated completion status only, not model-authored pass/fail claims. |
Refs #3671.
Raises the
js-yamlnpmoverridespin from 4.2.0 to 4.3.2 in the four CLI packages, regenerates their lockfiles, and adds the dependency-audit document the CI gate requires.One correction to the issue's framing
The issue offers "upgrade ... or remove YAML parsing from the OpenCode dependency path". Removing the override is not a safe option here, and it is worth recording why:
js-yamlis not a direct dependency of any of the four packages. It arrives transitively through@microsoft/agent-governance-sdk, and theoverridesfield is what holds it at 4.2.0 — it was added in the 2026-06-16 audit to clear GHSA-h67p-54hq-rp68. I checked what happens without it:4.1.1 is affected by both advisories in this issue and by the earlier one the override was added to fix. So the pin is doing real work and needs raising, not deleting.
I used 4.3.2 rather than the 4.3.1 floor named in the issue: 4.3.1 is the lowest unaffected release, 4.3.2 is the current patch on that line, and the packages pin exactly.
Verified
npm audit --package-lock-only, before onmainand after on this branch:agent-governance-antigravity-cliagent-governance-claude-codeagent-governance-copilot-cliagent-governance-opencodebash scripts/ci/vendored-patch-audit.shpasses with the new audit doc. The lockfile diffs contain nothing but thejs-yamlentry (its version, integrity, resolved URL, and the funding metadata the newer release ships).Not covered
The issue's third acceptance criterion — a clean downstream installation — is not fixed by this PR and cannot be.
overridesapplies to a package's own tree, not to consumers of the published package, whose resolution follows the SDK's constraint. The published SDK versions these depend on (4.0.0, and 3.7.0 for opencode) resolve to 4.1.1.agent-governance-typescriptalready declaresjs-yaml5.2.3 onmain, so a release cut from currentmaincarries a patched constraint of its own; until then downstream trees need their own override. I wrote this up in the audit doc rather than leaving it implicit.The fourth criterion — parser resource-bound tests where AGT consumes untrusted YAML — is a separate piece of work; happy to open an issue for it if you'd like it tracked.