Skip to content

Commit 10eaf37

Browse files
WomB0ComB0claude
andauthored
ci(security-scan): add opt-in safedep/vet OSS dependency policy job (#25)
- new `enable-vet` workflow_call input (default false; backward-compatible) - optional SAFEDEP_CLOUD_KEY/SAFEDEP_CLOUD_TENANT secrets (malware/zero-day) - `vet` job runs safedep/vet-action@v1.1.12 against the caller's .github/vet/policy.yml + .github/vet/exceptions.yml; soft-launch (continue-on-error) until callers seed exceptions and promote to required Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 0947449 commit 10eaf37

1 file changed

Lines changed: 45 additions & 0 deletions

File tree

.github/workflows/security-scan.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,14 @@ on:
6464
type: boolean
6565
required: false
6666
default: true
67+
enable-vet:
68+
description: >
69+
Run safedep/vet OSS dependency policy scan against the caller repo's
70+
.github/vet/policy.yml + .github/vet/exceptions.yml. Off by default;
71+
soft-launch (non-blocking) until exceptions are seeded.
72+
type: boolean
73+
required: false
74+
default: false
6775
submodules:
6876
description: >
6977
Checkout submodules for the CodeQL job (autobuild may need them).
@@ -86,13 +94,50 @@ on:
8694
SNYK_TOKEN:
8795
description: Snyk token. Used only when enable-snyk is true.
8896
required: false
97+
SAFEDEP_CLOUD_KEY:
98+
description: SafeDep Cloud API key (optional; malware/zero-day analysis). Used only when enable-vet is true.
99+
required: false
100+
SAFEDEP_CLOUD_TENANT:
101+
description: SafeDep Cloud tenant. Used only when enable-vet is true.
102+
required: false
89103

90104
permissions:
91105
contents: read
92106
security-events: write # CodeQL + SARIF uploads
93107
pull-requests: read # dependency-review
94108

95109
jobs:
110+
# ── safedep/vet — OSS Dependency Policy ───────────────────────────────────
111+
# Malware (MAL-), critical/high vulns, license allowlist (npm/PyPI/NuGet),
112+
# OpenSSF Scorecard maintenance/dangerous-workflow, popularity floor — gated
113+
# by the caller's .github/vet/policy.yml. Soft-launch: non-blocking until the
114+
# caller seeds .github/vet/exceptions.yml and promotes vet to a required check.
115+
vet:
116+
name: vet (OSS dependency policy)
117+
if: ${{ inputs.enable-vet }}
118+
runs-on: ubuntu-latest
119+
permissions:
120+
contents: read
121+
pull-requests: write # inline PR comments on changed deps
122+
issues: write
123+
steps:
124+
- name: Harden Runner
125+
uses: step-security/harden-runner@f808768d1510423e83855289c910610ca9b43176 # v2
126+
with:
127+
egress-policy: audit
128+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
129+
- name: Run safedep/vet
130+
uses: safedep/vet-action@6247cccd1b6683a27946ea3a0d45d3865346918b # v1.1.12
131+
with:
132+
policy: .github/vet/policy.yml
133+
exception-file: .github/vet/exceptions.yml
134+
exclude: "**/vendor/**, .cargo/**, **/node_modules/**, **/target/**, .worktrees/**"
135+
trusted-registries: "https://crates.io,https://registry.npmjs.org,https://pypi.org,https://api.nuget.org"
136+
upload-sarif: false # private repos w/o GHAS — use step summary
137+
cloud-key: ${{ secrets.SAFEDEP_CLOUD_KEY }}
138+
cloud-tenant: ${{ secrets.SAFEDEP_CLOUD_TENANT }}
139+
continue-on-error: true # SOFT-LAUNCH: warn-only until promoted to required
140+
96141
# ── CodeQL ────────────────────────────────────────────────────────────────
97142
# CodeQL is handled by GitHub's repo-level "default setup" (Settings →
98143
# Code security → CodeQL analysis). Running a matrix job here conflicts

0 commit comments

Comments
 (0)