Skip to content

feat(security): add npm_audit_severity_threshold input (default: moderate)#70

Merged
tehw0lf merged 2 commits into
mainfrom
feat/npm-audit-severity-threshold
Apr 23, 2026
Merged

feat(security): add npm_audit_severity_threshold input (default: moderate)#70
tehw0lf merged 2 commits into
mainfrom
feat/npm-audit-severity-threshold

Conversation

@tehw0lf
Copy link
Copy Markdown
Owner

@tehw0lf tehw0lf commented Apr 23, 2026

Summary

  • Adds npm_audit_severity_threshold input to build-test-publish.yml, security-scan-source.yml, and npm-audit-autofix.yml
  • Default is moderate (matches previous hardcoded behavior — no breaking change)
  • Callers can set high or critical to ignore lower-severity findings they can't control (e.g. transitive prod deps with no upstream fix)

Usage

uses: tehw0lf/workflows/.github/workflows/build-test-publish.yml@main
with:
  npm_audit_severity_threshold: "high"  # ignore moderate findings

Affected steps

  • npm audit --audit-level=<threshold> in security-scan-source.yml
  • yarn audit --level <threshold> in security-scan-source.yml
  • npm audit --audit-level=<threshold> verify-after-fix step in npm-audit-autofix.yml

tehw0lf added 2 commits April 23, 2026 21:50
…rate)

Allows callers to set the minimum severity level for npm/yarn audit failures.
Both the regular audit check and the verify-after-fix step use the threshold.
@tehw0lf tehw0lf merged commit 2400d43 into main Apr 23, 2026
2 checks passed
@tehw0lf tehw0lf deleted the feat/npm-audit-severity-threshold branch April 23, 2026 19:52
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