Skip to content

SDKS-3732: Harden Claude security-update prompt to verify lockfile consistency#4

Open
John Cunningham (SausCode) wants to merge 2 commits into
mainfrom
johncunningham/sdks-3732-harden-claude-security-update-prompt-to-verify-lockfile
Open

SDKS-3732: Harden Claude security-update prompt to verify lockfile consistency#4
John Cunningham (SausCode) wants to merge 2 commits into
mainfrom
johncunningham/sdks-3732-harden-claude-security-update-prompt-to-verify-lockfile

Conversation

@SausCode
Copy link
Copy Markdown
Contributor

SDKS-3732: Harden Claude security-update prompt to verify lockfile consistency

SDKS-3732

The previous prompt told Claude to verify with `npm install && npm run
build`, but CI runs strict commands (`yarn install --immutable`,
`npm ci`) that reject lockfile drift. Claude manually edited yarn.lock
without updating the descriptor key, declared success, and opened a
broken PR (#22600 in getditto/ditto).

Changes:
- Add yarn berry and yarn classic handling (step 3)
- Replace lenient verification with strict CI-equivalent commands (step 4)
- Add verification gate: must pass before declaring success
- Prohibit manual lockfile edits
- Pin to same major version unless CVE requires otherwise

Tested by running the improved prompt against the ditto monorepo at the
pre-fix commit — yarn install --immutable now passes where it previously
failed.

Resolves: SDKS-3732
@SausCode John Cunningham (SausCode) marked this pull request as ready for review May 8, 2026 00:59
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