security(npm): harden npm and update project deps#710
Conversation
| const child = spawn(cmd, args, { | ||
| stdio: "ignore", | ||
| detached: true, | ||
| shell: false, | ||
| }); |
|
Hi @pfarikrispy - thanks for the thoughtful security focus here, and for the follow-up commit. A few things I'd like you to scope down before this can merge:
Once scoped down to just the |
|
Yes I saw the giant trunk changes after the PR was created, I forgot they were in there. Won't it be much easier and cleaner to just close/delete this PR and create a new one for just the |
Yes, I agree @pfarikrispy |
|
/close
…On Fri, 19 Jun 2026, 17:08 Sonu Kapoor, ***@***.***> wrote:
*sonukapoor* left a comment (OWASP/cve-lite-cli#710)
<#710 (comment)>
Yes I saw the giant trunk changes after the PR was created, I forgot they
were in there.
Won't it be much easier and cleaner to just close/delete this PR and
create a new one for just the .npmrc?
Yes, I agree @pfarikrispy <https://github.com/pfarikrispy>
—
Reply to this email directly, view it on GitHub
<#710?email_source=notifications&email_token=AC622WZS7ARFCOOWCUEKLF35AVJONA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTINZVGI3TAOBSGEYKM4TFMFZW63VHNVSW45DJN5XKKZLWMVXHJLDGN5XXIZLSL5RWY2LDNM#issuecomment-4752708210>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AC622W7LMLQXDUAFQYSIOAL5AVJONAVCNFSNUABGKJSXA33TNF2G64TZHMYTCOJUGA2DMMRSG45US43TOVSTWNBXGAYTCMZUHAYTTILWAI>
.
Triage notifications, keep track of coding agent tasks and review pull
requests on the go with GitHub Mobile for iOS
<https://github.com/notifications/mobile/ios/AC622WYWWWOSVCMJEKWZQQD5AVJONA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTINZVGI3TAOBSGEYKM4TFMFZW63VHNVSW45DJN5XKKZLWMVXHJKTGN5XXIZLSL5UW64Y>
and Android
<https://github.com/notifications/mobile/android/AC622W6YEI5VWDVNDLXEDPL5AVJONA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTINZVGI3TAOBSGEYKM4TFMFZW63VHNVSW45DJN5XKKZLWMVXHJLTGN5XXIZLSL5QW4ZDSN5UWI>.
Download it today!
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Summary
npm ecosystem has become pretty vuln to malware through supply chain attacks. This PR adds a
.npmrcthat addresses that explicitly. Security best practices from an npm security community project where followed. Afterwards, deps were updated, attestations verified and a vuln in better-sqlite addressed by downgrading to 12.10.x, while we wait for upstream.Why this change
Without the "back-off period" for newer packages, the pkg mgr will pull in any and all updates as soon as available. Waiting for 3-5 days gives the community time to test, scan and prepare fixes when. supply chain attacks are detected.
What changed
.npmrcfile with:ignore-scripts=true: Disables arbitrary package lifecycle scripts during installations to block malicious post-install code execution.allow-git=none: Disallows git dependencies (which bypass security audits and registries).min-release-age=5: Enforces a 5-day release cooldown for dependencies.Validation
$ npm run build (Completed with exit code 0)npx npq:better-sqlite3@12.10.1: Flagged as a supply chain script warning (due to compiling native bindings on install) and a publication date of 6 days ago (which passes our 5-day project-level cooldown limit, though still flagged as recent by npq's default check).Other Packages: Several packages were noted for missing provenance attestations or showing dormancy before their latest release. However, all dependencies are standard packages from the officialregistry.npmjs.org.User-facing impact
Does not change any user-facing actions, only deps:
Notes