Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,10 @@
"classnames": "^2.5.1",
"clsx": "^2.1.1",
"cmdk": "^1.1.1",
"cva": "npm:class-variance-authority@^0.7.1",

Check warning on line 92 in frontend/package.json

View check run for this annotation

Claude / Claude Code Review

dompurify 3.4.0 may violate min-release-age=7 policy

This PR bumps dompurify to 3.4.0 (published 2026-04-14), but the repo's `frontend/.npmrc` enforces `min-release-age=7`, meaning the package won't satisfy the constraint until 2026-04-21. Any developer who deletes `package-lock.json` and runs `npm install` between now and April 21 will get a resolution failure. Consider delaying merge until April 21 or pinning an older version that already satisfies the 7-day window.
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 This PR bumps dompurify to 3.4.0 (published 2026-04-14), but the repo's frontend/.npmrc enforces min-release-age=7, meaning the package won't satisfy the constraint until 2026-04-21. Any developer who deletes package-lock.json and runs npm install between now and April 21 will get a resolution failure. Consider delaying merge until April 21 or pinning an older version that already satisfies the 7-day window.

Extended reasoning...

What the bug is and how it manifests

The repository explicitly enforces a supply-chain security policy via frontend/.npmrc: min-release-age=7. This setting, documented in root CLAUDE.md ("Both backend/ and frontend/ enforce a minimum release age of 7 days for npm packages... This means npm install will only resolve package versions published at least 7 days ago"), prevents npm from resolving packages published less than 7 days ago during dependency resolution.

dompurify 3.4.0 was published on 2026-04-14T07:51:39Z. This PR was opened 2026-04-16 — exactly 2 days later. The 7-day minimum-age window does not expire until 2026-04-21.

The specific code path that triggers it

Snyk runs in its own environment (likely without the local .npmrc policy), so it successfully resolves and pins dompurify 3.4.0 in package-lock.json. In the repo, any developer who regenerates the lockfile (deletes package-lock.json and runs npm install) before April 21 will trigger npm's dependency resolution phase, during which npm will see dompurify@^3.4.0 in package.json, attempt to resolve it, and the min-release-age=7 check will block 3.4.0 as it's only 2 days old.

Why existing code doesn't prevent it

The .npmrc policy is intentionally designed to protect against supply-chain attacks on newly published packages. However, Snyk's automated PR generation bypasses this check because Snyk runs in a sandboxed environment without the project's local .npmrc. The policy is enforced locally and in CI only when npm install (with resolution) is invoked — not when npm ci is used (which reads the lockfile directly, bypassing resolution entirely).

What the impact would be

The refutation correctly notes that npm install with an existing, compatible lockfile does not re-resolve dependencies, so ordinary developer npm install runs are unaffected. Similarly, npm ci (used in CI/CD pipelines) is unaffected. The failure scenario is narrowed to: a developer deletes package-lock.json (e.g., to resolve a merge conflict, add a new dependency from scratch, or troubleshoot) and runs npm install before April 21. During that ~5-day window, the install would fail with an error citing the min-release-age constraint. This is a real — if limited — developer friction point that directly contradicts the project's documented security policy.

How to fix it

The simplest fix is to delay merging this PR until 2026-04-21, when dompurify 3.4.0 will satisfy the 7-day constraint. Alternatively, if the security vulnerability is urgent enough to merge immediately, team members should be warned not to regenerate the lockfile until April 21.

Step-by-step proof

  1. Confirm: frontend/.npmrc contains min-release-age=7
  2. Confirm: dompurify 3.4.0 published 2026-04-14 (npm registry: "time": {"3.4.0": "2026-04-14T07:51:39.768Z"})
  3. PR opened: 2026-04-16. Age of 3.4.0 at PR creation = 2 days < 7 days required
  4. Developer action: rm frontend/package-lock.json && npm install (in frontend/)
  5. npm resolves dompurify@^3.4.0 → finds 3.4.0 as latest matching version
  6. npm checks min-release-age=7 → 3.4.0 is 2 days old → resolution blocked
  7. Result: npm ERR! No matching version found for dompurify@^3.4.0 (or equivalent min-release-age error)
  8. After 2026-04-21: same steps succeed normally — the issue is self-resolving

"date-fns": "^4.1.0",
"diff": "^8.0.3",
"dompurify": "^3.2.4",
"dompurify": "^3.4.0",
"file-saver": "^2.0.5",
"framer-motion": "^11.14.1",
"i18next": "^24.1.0",
Expand Down
Loading