Skip to content

fix(security): bump js-yaml past CVE-2026-59870 - #168

Merged
Zongwei9888 merged 1 commit into
mainfrom
fix/js-yaml-advisory
Aug 7, 2026
Merged

fix(security): bump js-yaml past CVE-2026-59870#168
Zongwei9888 merged 1 commit into
mainfrom
fix/js-yaml-advisory

Conversation

@Zongwei9888

Copy link
Copy Markdown
Collaborator

Why

npm audit began failing on main without anything in the repo changing — the advisory was published after the last green run (490aad6, 08-06 15:22):

js-yaml  4.0.0 - 4.3.0
Severity: high
GHSA-5p4m-2wfm-xmqj — quadratic CPU consumption in !!omap resolution

It reaches us twice through json-schema-to-typescript, which generates the Desktop's protocol types:

@deepcode/desktop
└─┬ json-schema-to-typescript@15.0.4
  ├─┬ @apidevtools/json-schema-ref-parser@11.9.3
  │ └── js-yaml@4.3.0
  └── js-yaml@4.3.0

That makes it a devDependency rather than something that ships, and a hostile schema is not a threat model this repo has. But the audit gate is set to --audit-level=high, and the fix is a patch release, so there is no reason to carry it.

Change

4.3.0 → 4.3.1, lockfile onlypackage.json is untouched and no direct dependency moved.

Testing

From a clean npm ci:

check result
npm audit --audit-level=high 0 vulnerabilities
npm run check:protocol pass — this is the consumer of js-yaml, so it is the one that would break
npm run typecheck clean
eslint . clean
vitest run 148 passed, 24 files
npm run build ✓ built

Note on the two PRs behind this

#165 and #166 are both green on Desktop CI, Linting and Python CI, and red only on Security CI for this same finding. Neither touches npm — one is markdown, the other a Python floor. Merging this first should clear them.

npm audit started reporting a high-severity finding on main without anything
in the repo changing — the advisory was published after the last green run:

  js-yaml 4.0.0 - 4.3.0
  GHSA-5p4m-2wfm-xmqj — quadratic CPU consumption in !!omap resolution

It arrives twice through json-schema-to-typescript, which generates the
Desktop's protocol types, so it is a devDependency rather than something that
ships. A malicious schema is not a threat model we have, but the audit gate
is set to fail on high and the fix is a patch release.

4.3.0 -> 4.3.1, lockfile only; package.json is untouched. Verified with a
clean npm ci: 0 vulnerabilities, check:protocol passes (it is the consumer of
js-yaml), typecheck, lint, 148 tests and the production build all clean.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@Zongwei9888
Zongwei9888 merged commit b53c852 into main Aug 7, 2026
14 checks passed
@Zongwei9888
Zongwei9888 deleted the fix/js-yaml-advisory branch August 7, 2026 06:56
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.

1 participant