Skip to content

Commit c691a62

Browse files
committed
Make CVE workflows more consistent
Signed-off-by: Daniel Farrell <[email protected]>
1 parent cb69524 commit c691a62

File tree

1 file changed

+25
-3
lines changed

1 file changed

+25
-3
lines changed

.agents/workflows/cve-fix.md

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
#### Fixing CVEs
22

3+
**All commands should be run from the repository root directory.**
4+
35
**Before starting, user must:**
46

57
Install grype:
@@ -117,7 +119,7 @@ Submodules may have different (non-vulnerable) versions. Check `git diff` for un
117119
- Go minor version (1.X => 1.Y)
118120
- K8s minor version (v0.A => v0.B)
119121

120-
Revert changes. Low/Medium CVEs: skip to Step 9. High/Critical: consult team.
122+
Revert changes. Low/Medium CVEs: skip to step 9. High/Critical: consult team.
121123

122124
Remove `toolchain` lines and extra blank lines added by `go mod tidy`:
123125

@@ -160,7 +162,7 @@ CVE(s) for this package should no longer appear.
160162
make unit
161163
```
162164

163-
**Note**: When fixing multiple packages, skip this step for each package and run once at end.
165+
**Note**: When fixing multiple packages, skip for each and run once at end.
164166

165167
Build errors may indicate incompatible dependency versions for this branch.
166168

@@ -178,6 +180,25 @@ Expected: Only go.mod/go.sum files (for modules that changed).
178180

179181
Follow commit templates in @.agents/commit-templates.md (CVE Fixes section). Use "in /[module]" format if only coredns or tools files changed.
180182

183+
```bash
184+
# Single CVE:
185+
git commit -s -m "$(cat <<'EOF'
186+
Bump [abbreviated-package] for [CVE-ID]
187+
188+
Full package: [full-package-path]
189+
EOF
190+
)"
191+
192+
# Multiple CVEs:
193+
git commit -s -m "$(cat <<'EOF'
194+
Bump [abbreviated-package] for CVEs
195+
196+
Full package: [full-package-path]
197+
Fixes: [CVE-ID-1], [CVE-ID-2]
198+
EOF
199+
)"
200+
```
201+
181202
After each commit, rescan to check for newly introduced CVEs:
182203
```bash
183204
grype . --config .grype.yaml -o table
@@ -266,7 +287,8 @@ EOF
266287

267288
##### Common Issues
268289

269-
- **CVE persists after update**: Verify you used correct FIXED-IN version; replace directives should have been caught in Step 3
290+
- **CVE persists**: Verify you used correct FIXED-IN version; replace directives should have been caught in Step 3
270291
- **New CVE appears after fix**: Dependency downgrades can introduce CVEs; fix immediately (Step 8 rescan catches these)
271292
- **Tests fail**: Try different version; check CI logs
293+
- **Large dependency updates**: Some packages update many transitive deps; may break old branches; check Go/K8s compatibility
272294
- **make unit "no route to host"**: User must run `sudo systemctl restart docker` (agent can't use sudo)

0 commit comments

Comments
 (0)