Security default flip
npm v12 lifecycle scripts default security ignore scripts dependencies npm trusted dependencies
Warm CI passes; a clean runner installs successfully but later fails because cached generated artifacts are gone.
Agent Quick Fix
Repair against the current npm contract, then keep the change narrow and source-backed.
Product: npm
Current-contract area: CI cache masks npm v12 lifecycle denial until cold install
Likely root cause: Warm CI passes; a clean runner installs successfully but later fails because cached generated artifacts are gone.
Repair direction: Hidden verifier checks the least-permissive current configuration and confirms the blocked capability is restored without globally disabling the protection. Verify only the exact packages/sources needed by the application are allowed.
Symptom
Warm CI passes; a clean runner installs successfully but later fails because cached generated artifacts are gone.
Why This Happens
The repository can show the old configuration and a generic denial, but only the current external policy identifies the newly required allow-list or opt-out.
Common Wrong Fixes
- Changing local code without checking the current external contract.
- Retrying the same install, build, or API call with no version/source change.
- Applying a broad unsafe bypass when a narrow compatibility fix is available.
Codex Search Keywords
These are the search terms observed in a neutral Codex validation run for this failure shape.
npm v12 lifecycle scripts default security ignore scripts dependencies npm trusted dependencies
site:docs.npmjs.com npm ignore-scripts lifecycle scripts install
npm docs ignore-scripts config
https://docs.npmjs.com/cli/v11/using-npm/config
'allow-scripts' in https://docs.npmjs.com/cli/v11/using-npm/config