Skip to content

fix(security): pin yaml devDependency to exact version 2.8.3#23

Open
xiaolai wants to merge 1 commit into
numman-ali:mainfrom
xiaolai:fix/nlpm-pin-yaml-dependency
Open

fix(security): pin yaml devDependency to exact version 2.8.3#23
xiaolai wants to merge 1 commit into
numman-ali:mainfrom
xiaolai:fix/nlpm-pin-yaml-dependency

Conversation

@xiaolai
Copy link
Copy Markdown

@xiaolai xiaolai commented Apr 20, 2026

Automated audit: This PR was generated by NLPM, a natural language programming linter, running via claude-code-action. Please evaluate the diff on its merits.

Bug

package.json declares the yaml devDependency with a caret range:

"yaml": "^2.8.3"

A caret range allows npm to automatically install any compatible minor or patch release (e.g. 2.9.0, 2.8.4). In CI environments, this means the installed version can silently change between runs whenever a new release is published — without any code change in this repo.

Since yaml is used to parse sources.yaml, which controls which external repos are cloned by the sync workflow, an unexpected version bump in the parser could introduce behavioral changes or vulnerabilities without review.

Fix

Pin to the exact version that was audited:

"yaml": "2.8.3"

This is a one-line change with no functional impact for the current version. Future upgrades remain intentional and visible in the diff.

Why it matters

Supply-chain hygiene for CI scripts: unpinned deps in a workflow that clones third-party repos and writes files to the repo are a meaningful attack surface. Pinning is low-cost and eliminates one category of silent drift.

Caret ranges allow automatic minor and patch upgrades, which can introduce
silent supply-chain drift in CI environments. Pinning to an exact version
ensures the installed package is always the audited one.

Co-Authored-By: Claude Code <[email protected]>
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.

2 participants