fix(security): pin production dependency versions to lock-file values - #105
Open
xiaolai wants to merge 1 commit into
Open
fix(security): pin production dependency versions to lock-file values#105xiaolai wants to merge 1 commit into
xiaolai wants to merge 1 commit into
Conversation
Six production dependencies used caret ranges, allowing automatic minor/patch upgrades that can introduce unexpected breakage. Pin each to the version already resolved in bun.lock so the installed tree is unchanged but future installs are fully reproducible without a lock file. Co-Authored-By: Claude Code <noreply@anthropic.com>
This was referenced Apr 20, 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
Six of eight production dependencies in
package.jsonwere specified with^caret ranges, allowing automatic minor and patch upgrades on a freshnpm installorbun install(without the lock file):@ai-sdk/openai^2.0.802.0.100ai^5.0.1085.0.157dotenv^17.2.317.3.1gray-matter^4.0.34.0.3migrate^2.1.02.1.0pg^8.20.08.20.0zod^4.3.64.3.6@tigerdata/mcp-boilerplatewas already pinned correctly at1.3.2.Fix
Pin each to the exact version already resolved in
bun.lock. The installed dependency tree is unchanged — this is a no-op for anyone running from the lock file. The benefit is that CI environments or downstream consumers who install without a lock file (Docker builds,npx, etc.) get a reproducible build rather than a potentially upgraded dependency.Why it matters
Unpinned
^ranges can silently pull in a new minor version that introduces a breaking change or a security regression before maintainers have a chance to review it. Pinning to exact versions and using automated tooling (Renovate, Dependabot) for controlled upgrades is a widely recommended practice for published packages and server-side code.If you prefer to keep caret ranges and rely on the lock file, that's a reasonable policy too — feel free to close this PR. The alternative is to add Dependabot or Renovate config so upgrades are reviewed as explicit PRs.