feat: add security-checks composite action#24
Open
andretetherio wants to merge 1 commit into
Open
Conversation
Reusable composite for PR-time security checks across Node OSS repos: - actions/dependency-review-action@v5 on the PR diff (SHA-pinned) - package-lock.json drift check (--ignore-scripts, no postinstall) - npm audit signatures + npm audit (informational warnings) - audit-ci high/critical gate, opt-in via .github/audit-ci.jsonc Runs on pull_request only (not pull_request_target); fork PRs get a read-only GITHUB_TOKEN, no secrets, no PR-code execution. Each check has a skip-<name> input. See README for trust model and inputs. Policy and rationale: tetherto/tips TIP-0001.
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.
Summary
Adds the reusable
security-checkscomposite action — implementation of tetherto/tips#7 (TIP-0001).Single composite that consumer repos invoke from their PR CI to run a coupled security gate:
actions/dependency-review-action@v5.0.0on the PR diff (SHA-pinned).package-lock.jsondrift check (npm install --package-lock-only --ignore-scripts --no-audit --no-fund— nonode_modules, nopostinstall).npm audit signatures— informational warning.npm audit --audit-level=moderate— informational warning.audit-cihigh/critical gate on the full lockfile — opt-in via.github/audit-ci.jsonc; skipped if missing.Security model
pull_requestonly (notpull_request_target). Fork PRs get a read-onlyGITHUB_TOKEN, no secrets, no PR-code execution.dependency-review-actionandnpm auditare pure registry/API lookups — no PR code runs.--ignore-scriptsso the root package'spostinstallis not executed.audit-ciallowlist lives in the consumer repo (.github/audit-ci.jsonc) — not centralised, so per-repo false positives don't block shared infra.Inputs
Each step has a
skip-<name>toggle;fail-on-severity,npm-audit-level,audit-ci-config,summary-title, andscope-labelare configurable. Full docs insecurity-checks/README.md.What this does NOT change
dependency-review-actionandnpm auditboth resolve against the GitHub Advisory Database (same data that powers Dependabot alerts).Test plan