Skip to content

DATA-12994: add npm audit CI gate for production deps - #35

Open
pragyash258 wants to merge 3 commits into
masterfrom
data-12994-npm-audit-ci
Open

DATA-12994: add npm audit CI gate for production deps#35
pragyash258 wants to merge 3 commits into
masterfrom
data-12994-npm-audit-ci

Conversation

@pragyash258

@pragyash258 pragyash258 commented Sep 1, 2026

Copy link
Copy Markdown
Collaborator

What

Adds a minimal CI workflow (.github/workflows/npm-audit.yml) that runs:

npm audit --omit=dev --audit-level=high

on PRs and pushes to master/main, so high/critical CVEs in the production dependency tree block merges.

Why

DATA-12994 (F-011) flags no automated npm audit in CI — known-CVE prod deps can sit undetected. This closes the CI-control half of that finding.

Scope decisions (deliberately minimal)

  • --omit=dev — only gates on production deps (what consumers of this published package actually install). The repo's 13 open dev-scope alerts (eslint transitive: lodash/minimatch/js-yaml/etc.) are intentionally out of scope.
  • --audit-level=high — gates on high/critical only. Verified green against the current master lockfile today (sole prod advisory is uuid medium, below the gate), so it does not break existing PRs.
  • GitHub Actions pinned to commit SHAs (checkout/setup-node v4.4.0) to satisfy Semgrep's mutable-tag rule, matching the existing Semgrep.yml style.
  • No dependabot.yml — omitted by design. CVE detection is already covered by Dependabot alerts (enabled), and no sibling repo in the fleet uses version-update config.

Adds a minimal CI job running 'npm audit --omit=dev --audit-level=high'
so high/critical CVEs in the production dependency tree block merges.
Scoped to prod deps at high level to match the current clean state.
@pragyash258
pragyash258 requested a review from a team as a code owner September 1, 2026 11:00
Comment thread .github/workflows/npm-audit.yml Fixed
Comment thread .github/workflows/npm-audit.yml Fixed
Addresses Semgrep github-actions-mutable-action-tag findings; matches
the SHA-pinning style already used in Semgrep.yml.
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.

2 participants