docs(agents): require top-level dependency bumps over npm overrides - #1376
Open
anupamme wants to merge 1 commit into
Open
docs(agents): require top-level dependency bumps over npm overrides#1376anupamme wants to merge 1 commit into
anupamme wants to merge 1 commit into
Conversation
Adds three rules to the Dependencies policy, prompted by the discussion on cuttle-cards#1367: - Fix vulnerable transitive packages by bumping the dependency that owns them. A global `overrides` entry applies to every consumer in the tree, so it can downgrade packages already on a patched version. - Never hand-edit `package-lock.json`. `npm ci` installs an edited lockfile verbatim instead of rejecting it, so CI won't catch it. - Verify with `npm ls`/`npm audit`, and note that no CI job exercises Postgres, so adapter changes need the docker compose stack. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.
Follows up on the review discussion in #1367, where an automated CVE fix used a global
overridesentry plus a hand-edited lockfile. The maintainer asked that future automated PRs against this repo prefer bumping the top-level dependency that owns the transitive package, and that lockfiles be produced bynpm install. This writes that guidance into theDependenciespolicy so agents pick it up fromAGENTS.mdinstead of rediscovering it in review.Three additions:
overrides. In fix: upgrade minimist to 1.2.6, 0.2.4 (CVE-2021-44906) #1367 a globalminimistpin patched the one vulnerable consumer (knex@0.12.7) and downgraded five that were already patched, includingcypress, which declares^1.2.8.npm ciinstalls a hand-edited lockfile verbatim rather than rejecting it, so CI does not catch this class of mistake.npm ls <package>andnpm auditafter any dependency change, plus a note that neithernpm run test:unitnor the Cypress e2e suite exercises Postgres (both run onsails-disk), so adapter changes neednpm run docker:startto be validated.Docs only; no code or dependency changes.
Validation:
npm run lintpasses.npm run test:unitfails locally, but for an unrelated environmental reason — all 14 failures trace toutil.isDate is not a functionin@sailshq/nedb, which Node removed in v23. This machine has Node v25.9.0 while.nvmrcpins22.21, and the failures reproduce on unmodifiedmain(this branch's only diff is the threeAGENTS.mdlines).🤖 Generated with Claude Code