Go Module & Security Audit Skill
govulncheck and dependency policy skill for agents - a cookbook-style Agent Skill for Go 1.26 module security sweeps before release.
Search across all documentation pages
govulncheck and dependency policy skill for agents - a cookbook-style Agent Skill for Go 1.26 module security sweeps before release.
Produces an executable audit plan: govulncheck results, vulnerable import traces, proposed go get pins, license/policy flags, and verification commands - without auto-merging dependency changes.
go get upgradesgo work workspace| Input | Why |
|---|---|
go.mod / go.sum | Module graph and checksums |
| Team dependency policy ADR | Allowed majors, internal proxy |
GOPROXY / GONOSUMDB settings | Reproducible audit environment |
| License allowlist | Block GPL if policy requires |
| Previous audit ticket | Track regressions |
govulncheck -json summary table: CVE, module, fixed version, call pathgo get module@version commands (human approves)go test ./..., go mod verify, optional syft SBOM commandgo get -u ./... without explicit human approval and changelog review.go.sum manually - only go get / go mod tidy.retract directives in consumer go.mod.GOPRIVATE before publishing audit logs.Quick-reference recipe card - copy-paste ready.
# 1. Baseline module integrity
go mod verify
go list -m -json all | head # sanity: graph resolves
# 2. Vulnerability scan
govulncheck -json ./... > /tmp/vuln.json
# 3. Human-readable summary
govulncheck ./...
# 4. After approved pins only
go get golang.org/x/net@v0.34.0
go mod tidy
go test ./...
govulncheck ./...When to reach for this skill:
go version # expect 1.26.x per stack pin
echo "$GOPROXY" # document proxy used for audit
go env GOMODgovulncheck -show verbose ./...| Column | Meaning |
|---|---|
| Vulnerability | OSV/CVE ID |
| Module | Affected module path |
| Found in | Your import chain |
| Fixed in | Upgrade target |
# Example output suggestion - human runs after approval
go get golang.org/x/crypto@v0.31.0
go mod tidyDocument why each pin is needed: CVE, call path, breaking change risk.
# If team uses syft or go-licenses - adapt to your toolchain
go list -m -json all | jq -r '.Path' | sort -uFlag modules outside allowlist for legal review.
go test ./... -count=1
go mod verify
govulncheck ./...Minimal Version Selection (MVS) means go get on one module may pull transitive pins.
Skill output should list direct and indirect changes from go list -m -u all diff.
replace directives hide versions from naive scanners - audit go.mod replace block explicitly.
go work workspaces require running govulncheck from each module or workspace root per team convention.
Retract in your own module: skill should verify you are not publishing retracted versions.
go get -u on stdlib-related x/* modules can cascade - pin surgically.-mod=vendor) needs go mod vendor after pins - mention in output.go mod verify in CI - separate policy.| Approach | When |
|---|---|
| Dependabot only | GitHub-native, less call-path detail |
| OSV-Scanner | Polyglot repos |
Manual go list -m -u | Tiny modules |
| This skill | Agent-assisted audit with team policy gates |
No. Draft commands and summary only. Human reviews changelog and runs full CI.
Yes for production services. Skill references same command CI uses so local and pipeline align.
Output documents risk acceptance ticket, compensating controls, and monitor for fixed version.
Stack versions: This page was written for Go 1.26.x (Green Tea GC default, go fix modernizers - verify patch at build), chi (latest - verify at build), gin (latest - verify at build), echo (latest - verify at build), google.golang.org/grpc (latest - verify at build), sigs.k8s.io/controller-runtime (latest - verify at build), kubebuilder (latest - verify at build), tinygo (latest - verify board targets at build), wazero (latest - verify at build), and golangci-lint (latest - verify linter set at build).
Reviewed by Chris St. John·Last updated Jul 16, 2026