security: enforce frozen lockfile during setup#614
Open
halbert04 wants to merge 1 commit intogarrytan:mainfrom
Open
security: enforce frozen lockfile during setup#614halbert04 wants to merge 1 commit intogarrytan:mainfrom
halbert04 wants to merge 1 commit intogarrytan:mainfrom
Conversation
bun install with caret ranges (^1.58.2) resolves to latest compatible versions at install time. A compromised npm publish of playwright or puppeteer-core would get code execution on every setup run. Using --frozen-lockfile ensures the resolved versions in bun.lock are used exactly, preventing dependency confusion attacks. The fallback in the .agents/ generation block (line 199) already uses --frozen-lockfile. This makes the main build block consistent. Made-with: Cursor
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.
Summary
bun installtobun install --frozen-lockfilein the main build block of thesetupscriptplaywright,puppeteer-core, or any transitive dependency resolves to a malicious version at install time.agents/generation block (line 199) already uses--frozen-lockfilewith a fallback — this makes the main build path consistentWhy this matters
gstack's setup runs
bun installwhich resolves^1.58.2to the latest compatible version. If an attacker publishes a compromised version of any dependency in the resolution range, every new./setupor/gstack-upgraderun would pull it. With--frozen-lockfile, only versions pinned inbun.lockare installed.Risk
Low. If
bun.lockis missing or stale (e.g., after a dependency bump inpackage.jsonwithout runningbun installto update the lock), setup will fail with a clear error instead of silently resolving new versions. This is the correct behavior — maintainers should commit an updated lockfile.Test plan
./setupsucceeds with existingbun.lock./setupfails clearly whenbun.lockis deleted (expected: error message about frozen lockfile)Made with Cursor