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
# Update the module in every go.mod file that references it.
89
-
while IFS= read -r gomod;do
90
-
dir=$(dirname "${gomod}")
91
-
echo" → ${dir}"
92
-
go -C "${dir}" get "${module}@${fixed_version}"|| {
93
-
echo" ✗ Failed to update ${module} in ${dir}, skipping"
94
-
}
95
-
done<<(grep -rl "${module}" --include='go.mod' .)
96
-
97
-
done<"${FIXES_FILE}"
98
-
99
-
# ── Tidy all modified modules ─────────────────────────────────────────────────
100
-
echo"==> Running go mod tidy..."
101
-
while IFS= read -r gomod;do
102
-
dir=$(dirname "${gomod}")
103
-
go -C "${dir}" mod tidy ||true
104
-
done<<(find . -name go.mod \
105
-
-not -path './.git/*' \
106
-
-not -path './_tools/*' \
107
-
-not -path './scripts/*')
108
-
109
-
# ── Check if anything changed ─────────────────────────────────────────────────
110
-
if git diff --quiet;then
111
-
echo"No changes after applying fixes (all dependencies already at required versions)."
112
-
echo"has_fixes=false">>"${GITHUB_OUTPUT}"
113
-
rm -f "${FIXES_FILE}"
114
-
exit 0
115
-
fi
116
-
117
-
# ── Generate PR body ───────────────────────────────────────────────────────────
118
-
{
119
-
cat << 'HEADER'
120
-
## Summary
121
-
122
-
This PR was automatically generated by the [Govulncheck Remediation](.github/workflows/govulncheck-fix.yml) workflow.
123
-
124
-
`govulncheck` identified the following reachable vulnerabilities with available fixes and updated the affected `go.mod` files.
125
-
126
-
> Unlike Dependabot, `govulncheck` uses call graph analysis to only report vulnerabilities in code paths that are **actually reachable** from this module, eliminating false positives from transitively-imported-but-never-called code.
127
-
128
-
### Updated Dependencies
129
-
130
-
HEADER
131
-
132
-
while IFS=''read -r module fixed_version;do
133
-
echo"- \`${module}\` → \`${fixed_version}\`"
134
-
done<"${FIXES_FILE}"
135
-
136
-
cat << 'FOOTER'
137
-
138
-
## Test Plan
139
-
140
-
- [ ] CI passes with updated dependencies
141
-
- [ ] `govulncheck-tests` job reports no remaining vulnerabilities for updated packages
142
-
143
-
## References
144
-
145
-
- [Filippo Valsorda: Turn Dependabot Off](https://words.filippo.io/dependabot/) — rationale for govulncheck over Dependabot alerts
146
-
- [golang/govulncheck-action](https://github.com/golang/govulncheck-action) — official Go team action with SARIF support
147
-
- [govulncheck documentation](https://pkg.go.dev/golang.org/x/vuln/cmd/govulncheck) — JSON output format
Copy file name to clipboardExpand all lines: .gitlab-ci.yml
+19-17Lines changed: 19 additions & 17 deletions
Original file line number
Diff line number
Diff line change
@@ -11,37 +11,36 @@ stages:
11
11
- test-apps
12
12
13
13
variables:
14
-
# This base image is created here: https://gitlab.ddbuild.io/DataDog/apm-reliability/benchmarking-platform/-/jobs/1422209418
# This base image is created here: https://gitlab.ddbuild.io/DataDog/apm-reliability/benchmarking-platform/-/jobs/1577883208
0 commit comments