From a1d3c185e103524bf953fe07a140c63819c88ad7 Mon Sep 17 00:00:00 2001 From: Shyngys Shynbolatov Date: Wed, 14 Oct 2026 04:15:29 +0600 Subject: [PATCH] ci: flag risky dependency changes on PRs with npmscan (warn-only) Co-Authored-By: Claude Opus 5.5 --- .github/workflows/npmscan.yml | 36 +++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .github/workflows/npmscan.yml diff --git a/.github/workflows/npmscan.yml b/.github/workflows/npmscan.yml new file mode 100644 index 00000000..8e9ceaae --- /dev/null +++ b/.github/workflows/npmscan.yml @@ -0,0 +1,36 @@ +name: npmscan + +# Diffs package-lock.json against the PR base with npmscan.com and flags known +# malware, new install scripts, changed tarball URLs or integrity hashes, and +# changed overrides. Warn-only: findings never fail the check. + +on: + pull_request: + paths: + - '**/package.json' + - package-lock.json + +permissions: + contents: read + +concurrency: + group: npmscan-${{ github.event.pull_request.number }} + cancel-in-progress: true + +jobs: + scan: + name: npmscan dependency check + runs-on: ubuntu-latest + timeout-minutes: 10 + permissions: + contents: read + pull-requests: write # one report comment (fork PRs use the job summary) + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + persist-credentials: false + - uses: NPMscan/npmscan-action@de14168f65640a4ed1f0e82ad3ad8c80483d360d # v1.3.0 + with: + file: package-lock.json + mode: warn + fail-on-error: false