ci(security): add npm audit and dependency review jobs - #443
Merged
mikewheeleer merged 1 commit intoJul 26, 2026
Merged
Conversation
Contributor
|
really nice — thanks for picking it up 🙌 |
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.
closes #349
Summary
Add a dependency audit and review job to the CI workflow:
dependency-auditjob — runsnpm audit --jsonviascripts/audit-deps.js, filters results through a documented, time-boxed allowlist (.audit-allowlist.json), and fails the build only on high/critical findings that aren't allowlisted.dependency-reviewjob — usesactions/dependency-review-action@v4on pull requests to flag newly introduced vulnerable packages..audit-allowlist.jsonat the project root supports entries with{ id, reason, expires }. Expired entries are automatically ignored. Enables temporary suppression of advisories with no available fix.src/ci/audit.ts— core module withloadAllowlist,parseAuditOutput,filterVulnerabilities,runNpmAudit, andcheckDependencies(100% statement/line coverage, 98.14% branch coverage).docs/CI.md— updated with documentation for all new jobs, allowlist format, and local audit usage.Related Issue
Closes #349
Validation
npm run buildnpm run lintnpm testChecklist
.envfiles, or private credentials.Security Notes
npm audit --jsonoutput is parsed and filtered locally; no data is sent to external services.actions/dependency-review-action@v4runs only on PRs and requirescontents: read+pull-requests: writepermissions to post PR comments. Thefail-on-severity: highsetting prevents new high-severity dependencies from being merged.src/ci/audit.ts→loadAllowlist) validates every entry has a stringidfield and a non-emptyid. Expired entries are automatically discarded, preventing stale allowlist entries from silently suppressing vulnerabilities.scripts/audit-deps.jsscript runs in CI vianodeand usests-nodefor TypeScript transpilation (already a transitive dev dependency). No new runtime dependencies are introduced.