fix(security): pin packages/cli runtime dependencies to exact versions#68
Open
xiaolai wants to merge 1 commit intocodeaholicguy:mainfrom
Open
fix(security): pin packages/cli runtime dependencies to exact versions#68xiaolai wants to merge 1 commit intocodeaholicguy:mainfrom
xiaolai wants to merge 1 commit intocodeaholicguy:mainfrom
Conversation
Co-Authored-By: Claude Code <noreply@anthropic.com>
This was referenced Apr 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bug
packages/cli/package.jsondeclares runtime dependencies with^(caret) ranges, meaning npm can silently resolve to any compatible minor/patch version:For a published CLI tool, unpinned runtime dependencies create a supply chain window: if any of these packages is compromised at a minor/patch release between the time the lock file was generated and when a user installs the package, the user's
npm installwould pull in the malicious version (since end users typically don't have the repo's lock file).Fix
Pins each runtime dependency to the exact version currently resolved in
package-lock.json:chalk^4.1.24.1.2commander^11.1.011.1.0debug^4.4.34.4.3fs-extra^11.2.011.3.2gray-matter^4.0.34.0.3inquirer^8.2.68.2.7ora^5.4.15.4.1smol-toml^1.6.11.6.1yaml^2.3.42.8.3zod^3.25.763.25.76The
@ai-devkit/*workspace packages were already pinned to exact versions and are unchanged.Impact
Low severity. This is supply chain hardening for the published npm package. End users installing
ai-devkitfrom the registry don't have access to the repo's lock file, so pinning inpackage.jsonis the only protection they have against a compromised dependency release.