chore: deny unreviewed dependency install scripts - #21
Merged
Merged
Conversation
- deny msgpackr-extract (optional native speedup; only types are used from @opencode-ai/plugin) - .npmrc strict-allow-scripts=true so any new unreviewed install script fails npm ci
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.
What & why
npm 11 warns on every
npm cithatmsgpackr-extracthas an install script nobody has reviewed. It comes in via@opencode-ai/plugin→effect→msgpackr.package.json: addsallowScripts: { "msgpackr-extract": false }. It's an optional native speedup: msgpackr falls back to pure JS, and we only import types from the plugin package..npmrc: addsstrict-allow-scripts=true, so a new unreviewed install script failsnpm ciinstead of only warning. npm 12 will block these by default.Consumers are unaffected.
allowScriptsis only read from the root project, and.npmrcis never packed. Renovate runs npm with scripts disabled, so it can still open PRs. CI on a PR that adds a new install-script dependency will fail until the script is approved or denied withnpm install-scripts approve|deny <pkg>.Closes: N/A (audit item C7)
Behavior impact
periodFor, boundaries, gentle override)dayTheme,nightTheme,dayStartHour,nightStartHour,checkIntervalMs,toast) — README options table updatedpackage.jsonexports,files, published contents)Testing
npm run typecheckpassesnpm testpasses (22/22)Also verified:
npm cino longer prints the install-scripts warning. With the deny entry removed, it fails with--strict-allow-scripts, as intended.npm pack --dry-runlists onlyLICENSE,README.md,package.jsonandsrc/index.ts.Checklist
(enforced by the PR Title check; drives the release-please version bump)