Skip to content

ci: add npmscan dependency security check - #259

Open
salemalem wants to merge 1 commit into
VeloraDEX:masterfrom
salemalem:ci/add-npmscan-warn-mode
Open

salemalem wants to merge 1 commit into
VeloraDEX:masterfrom
salemalem:ci/add-npmscan-warn-mode

Conversation

@salemalem

@salemalem salemalem commented Nov 19, 2026 •

Copy link
Copy Markdown

What does this PR do?

Adds a standalone .github/workflows/npmscan.yml that runs npmscan-action on pull requests. It diffs the lockfile between the PR base and head and flags supply-chain red flags in the changed dependencies: newly added install scripts (preinstall/install/postinstall), repointed or swapped tarballs (URL/integrity changes), added or changed overrides/resolutions, and known vulnerabilities in newly introduced versions.

Why?

Malicious package versions usually arrive through lockfile changes in otherwise ordinary PRs, where a reviewer rarely reads the lockfile diff. This check summarises what changed so those entries stand out.

Configuration notes

  • Non-blocking: mode: warn and fail-on-error: false, so it reports findings but never fails CI.
  • Pinned: the action is pinned to a full commit SHA, not a floating tag.
  • Scoped: one new file; no existing workflows are touched. The job only needs contents: read (plus pull-requests: write to post a single summary comment; on fork PRs the token is read-only, so findings go to annotations and the job summary instead).

Disclosure

I maintain npmscan and npmscan-action, so I have an interest in this. If it isn't a fit for the project, please feel free to close; no hard feelings.


Note

Low Risk
CI-only addition; non-blocking scans with pinned third-party actions and no changes to application or existing workflows.

Overview
Adds a new GitHub Actions workflow NPMscan that runs on pull requests when package.json, pnpm-lock.yaml, or the workflow file changes.

The job uses the pinned npmscan-action to diff lockfile changes between base and head and surface supply-chain signals (install scripts, tarball/integrity changes, overrides, new vulns). It runs in warn mode with fail-on-error: false, posts a comment when findings exist, and uses minimal permissions (contents: read, pull-requests: write) with checkout credentials not persisted.

Reviewed by Cursor Bugbot for commit 059d54b. Bugbot is set up for automated code reviews on this repo. Configure here.

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