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
{{ message }}
Repository navigation
Main module with a (devel) or v0.0.0 pseudo-version is flagged with all of its own advisories #416
When a Go binary's main module has no usable version, Deputy reports it against every advisory for that module, including ones fixed long before the code was built. Two common cases:
(devel): go build without VCS stamping (for example -buildvcs=false, or a build from a tarball or shallow checkout without .git).
v0.0.0-<timestamp>-<sha>: a pseudo-version with no tag ancestry, which sorts below every real release.
Today an unparseable (devel) is treated as affected, and v0.0.0-… compares below every fixed version, so a build of a project's current main is flagged with all of that project's historical advisories. For example, a dev build of go.temporal.io/server is reported against GHSA-q98v-9f9w-f49q and GHSA-xpg8-3hhp-p7w8 (and nine others), all fixed in releases that predate the build. Other scanners (for example grype) show the same false positive.
A pseudo-version with real tag ancestry (v1.33.0-0.<ts>-<sha>) already compares correctly and is not flagged; #415 adds a regression test for that case.
Proposal
For the main module only (dependencies keep today's behavior):
When the version is (devel) or a v0.0.0- pseudo-version, do not report the module's own advisories as vulnerabilities by default.
Use what the binary already records where it helps: if build info carries vcs.revision / vcs.time, and the advisory's fixed release can be dated, report as affected only when the build time predates the fix. Otherwise the result is unknown.
Report unknowns honestly: list the main module under coverage as "version unknown, own advisories not evaluated" (with the advisory count), instead of either silently dropping them or flagging them all.
Let policy opt into fail-closed: expose the unknown-version state to CEL so a team can choose treat unknown main-module version as affected.
Acceptance
A (devel) and a v0.0.0-… main module produce no findings for the module's own advisories by default, and appear in coverage as version-unknown with the skipped advisory count.
Dependencies of the same binary are unaffected by this change.
A policy can opt into treating the unknown version as affected.
Tests cover (devel), v0.0.0-…, a tagged pseudo-version above the fix (not flagged), and a real old release below the fix (flagged).
Activity