repo/lockfile-committed/go
Dependency lockfile is committed
Implements repo/lockfile-committed for go.
| Severity | error |
| Tiers | 1, 2 |
| Stacks | go |
| Scope | each |
| Kind | expr |
| Source | library v0.8.0 |
| Selected by | fleetlint-recommended@v0.8.0 |
Requirement
go.sum is tracked when go.mod requires any module.
Why
Builds are reproducible only when dependency versions are pinned in git.
Check
"go.sum" in tracked() || scan("go.mod", r'^\s*require\b').size() == 0Fix
Run go mod tidy and commit go.sum.
Agent instruction (from repo/lockfile-committed): Run the package manager to produce the lockfile, remove any .gitignore entry for it, and commit it.
A finding that names no file points at go.sum.
Sources
- https://github.com/ossf/package-manager-best-practices/blob/main/published/npm.md (guidance)
- https://fleetlint.org/baseline/#dependencies (convention)
- https://go.dev/ref/mod (spec, go.sum files)
- https://fleetlint.org/stacks/#go
Generated by fleetlint docs from catalog v0.8.0.