ci: scan with the toolchain go.mod names - #8
Merged
Merged
Conversation
golang/govulncheck-action always forwards its own go-version-input, which defaults to "stable", to setup-go, and setup-go prefers go-version to go-version-file. Our go-version-file: go.mod was therefore ignored, and the runs said so in an annotation nobody had read yet: Both go-version and go-version-file inputs are specified, only go-version will be used The scan ran on whatever "stable" resolved to rather than the toolchain goreleaser builds the release with, so the standard-library half of the report described a binary nobody ships. Call setup-go and govulncheck directly instead: the two steps are everything the action did, minus the override, and they drop its nested checkout of the repository too. govulncheck is pinned in GOVULNCHECK_VERSION alongside SVU_VERSION, by hand, for the same reason: dependabot cannot see a `go install` argument. Pinning the scanner does not pin what it knows about, because it fetches the vulnerability database at run time. v1.8.0 reports no vulnerabilities monmux calls. Also shorten the two release dispatch inputs. GitHub renders `description` as the form label with no separate help text, so the explanation now sits in a comment above each input, where it still serves a reader of the file and no longer fills the dispatch form.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
golang/govulncheck-actionalways forwards its owngo-version-input— which defaults tostable— tosetup-go, andsetup-goprefersgo-versionovergo-version-file. Ourgo-version-file: go.modwas therefore ignored in both workflows, and the dry-run release said so in an annotation:So the scan ran on whatever
stableresolved to on the day, rather than the toolchain goreleaser builds the release with. The standard-library half of the report described a binary nobody ships.setup-go+govulncheckare now called directly. Those two steps are everything the action did, minus the override, and they also drop its nested checkout of the repository.Why pin the scanner
GOVULNCHECK_VERSIONsits next toSVU_VERSIONand is bumped by hand for the same reason: dependabot cannot see ago installargument. Pinning the tool does not pin what it knows about — the vulnerability database is fetched at run time.v1.8.0run locally against this tree reports no vulnerabilities monmux calls.Also here
The two release dispatch inputs were wordy because GitHub renders
descriptionas the form label and offers no separate help text. The explanation moved to a comment above each input, where it still serves whoever reads the file:The shortened labels only appear in the dispatch form once this is on
main, since the form is read from the default branch.Monitor writes
None. No step in either workflow runs
monmuxor touches a monitor, and this change adds none.Testing
make check-stageclean: actionlint, yamllint, prettier-yaml, markdownlint all passgovulncheck@v1.8.0 ./...run locally:No vulnerabilities found, exit 0govulncheckjob on this PR is itself the test of the replacement