Skip to content

Extend npm protected mutation path guards - #198

Merged
newtv-ai merged 5 commits into
mainfrom
audit/npm-persistent-path-overlap-followup
Aug 23, 2026
Merged

Extend npm protected mutation path guards#198
newtv-ai merged 5 commits into
mainfrom
audit/npm-persistent-path-overlap-followup

Conversation

@newtv-ai

Copy link
Copy Markdown
Owner

Summary

Follow up #197 by extending npm vendor-mutation overlap protection to additional source-backed persistent/security path configuration.

Current npm exposes long-lived path-valued inputs beyond prefix, userconfig, and logs-dir, including globalconfig, cafile, init-module/init.module, and node-gyp; npm 12 additionally exposes the user-owned global-ignore-file. If any of these is redirected inside _cacache or an exact npx entry, npm's recursive vendor command would otherwise be broader than the mutation scope DevClean presents.

Change

  • Use the already-bound npm CLI and pinned cache environment to prove npm major before the boundary query.
  • Query the stable audited path set for npm 11 and earlier.
  • Query global-ignore-file additionally for npm 12+ so older npm is not failed merely for lacking a newer key.
  • Re-confirm the reviewed cache and fail closed when any protected persistent/security path is equal to or inside the exact mutation root.
  • Preserve all existing process rechecks, CLI/cache identity binding, npx dry-run proof, fixed vendor commands, postconditions, and no-filesystem-fallback behavior.

Non-goals

No rule ownership/lane changes, no raw filesystem TOOL roots, no new deletion authority, no UI changes, and no generic-scan pruning. The npm scan-performance audit remains separate.

Audit: docs/npm-persistent-path-overlap-followup-audit.md.

Merge gate

Merge only from the exact final head after lock/dependency checks, Ruff, strict mypy, full pytest, Windows EXE build/upload, and CodeQL are all green.

@newtv-ai
newtv-ai marked this pull request as ready for review August 23, 2026 18:44
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@newtv-ai
newtv-ai merged commit 48368d6 into main Aug 23, 2026
3 checks passed
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