You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/github-actions/scan-dependencies.md
+30-3Lines changed: 30 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,23 +13,50 @@ Scans project dependencies for known vulnerabilities.
13
13
### Description
14
14
15
15
This composite action scans project dependencies to identify known security vulnerabilities.
16
+
It always produces the SBOM, raw Grype JSON report, and markdown summary, and it fails the workflow when High or Critical vulnerabilities are present unless the triggering PR carries a configured skip label.
- Reports: SBOM JSON, Grype JSON, and markdown summary
43
+
- Alerts: High and Critical vulnerabilities fail by default
44
+
45
+
### Ignore File
46
+
47
+
If a repository contains a file at `scripts/config/grype.yaml`, each non-comment line is treated as a Grype vulnerability ID to suppress. For example:
48
+
49
+
```text
50
+
CVE-2026-25128 # Ticket to review: CCM-14317
51
+
GHSA-xxxx-yyyy-zzzz
52
+
```
53
+
54
+
### Skip Label
55
+
56
+
Set `skip_if_pr_has_label` to a PR label name if you need to skip the blocking failure for known High or Critical findings that are already being handled elsewhere.
57
+
58
+
- The scan still runs.
59
+
- Reports and summaries are still uploaded.
60
+
- Only the final blocking failure is skipped when the label is present.
pre-commit run --config scripts/config/pre-commit.yaml --hook-stage manual scan-dependencies
135
+
```
136
+
118
137
## Setup in Your Repository
119
138
120
139
Add to your `.pre-commit-config.yaml`:
@@ -128,6 +147,7 @@ repos:
128
147
- id: check-file-format
129
148
- id: check-markdown-format
130
149
- id: lint-terraform
150
+
- id: scan-dependencies
131
151
# Add other hooks as needed
132
152
```
133
153
@@ -142,3 +162,4 @@ pre-commit install
142
162
- All hooks run with `pass_filenames: false` - they operate on the entire repository
143
163
- The `scan-secrets` hook checks the entire Git history for security
144
164
- Hooks reference scripts in either `scripts/githooks/` or `.github/actions/`
165
+
-`scan-dependencies` uses the same Grype-based workflow as CI, respects `scripts/config/grype.yaml` when present, and is configured as a manual-only hook
0 commit comments