Repository navigation
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
🌱 graft blast radiusNothing outside this diff depends on it. 0 areas changed; no indexed dependents at depth 2.
Open the interactive graph → — click an area to see its dependent symbols at file:line. |
This branch has not been deployed
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.
Related to #429, which asks for scanning that blocks malicious packages before they reach the code. This is one lightweight option for the "or similar": it reviews each dependency PR rather than installing a GitHub app.
What it does
Adds
.github/workflows/npmscan.yml. When a PR changes apackage.jsonorpackage-lock.json, it diffs the lockfile against the base commit and reports only what changed:preinstall/install/postinstall, or a new dependency that has oneHow it's configured
mode: warnandfail-on-error: false: it never fails the check, even if the npmscan API is down.v1.3.0SHA, and checkout uses the samev7.0.1SHA as your other workflows, withpersist-credentials: false. Workflow-levelcontents: read; the job addspull-requests: write, used only to post or update one report comment. Fork PRs get a read-only token, so their report goes to the job summary instead.package-lock.json, from the base commit and from the PR, over HTTPS to the npmscan.com API; nothing is stored (privacy). It's a composite action, one bash script plus a jq template (source,de14168is thev1.3.0tag).Testing
The workflow only runs on a PR that changes a
package.jsonor the lockfile, so it doesn't run on this one. I replayed #287's lockfile change (openai 6 → 7) through the same API: it parses and flags nothing.