Skip to content

feat: fix the vulncheck-filter to parse the text format instead#2525

Open
cstockton wants to merge 4 commits into
masterfrom
cs/feat-tools-dir-vulncheck-fix
Open

feat: fix the vulncheck-filter to parse the text format instead#2525
cstockton wants to merge 4 commits into
masterfrom
cs/feat-tools-dir-vulncheck-fix

Conversation

@cstockton
Copy link
Copy Markdown
Contributor

The existing parser wasn't decoding any values. Once I fixed the decoding it started printing 64 results. After looking into it I realized that govulncheck cmd does some additional aggregation. It turns out that it's non-trivial, rather than try to duplicate that
I just parsed the text output instead.

This change should cause the tests to start failing.

@cstockton cstockton requested a review from a team as a code owner May 11, 2026 22:38
Comment thread hack/vulncheck-filter/main.go Outdated
Base automatically changed from cs/feat-tools-dir to master May 12, 2026 16:11
The existing parser wasn't decoding any values. Once I fixed the
decoding it started printing 64 results. After looking into it I
realized that govulncheck cmd does some additional aggregation. It
turns out that it's non-trivial, rather than try to duplicate that
I just parsed the text output instead.
@cstockton cstockton force-pushed the cs/feat-tools-dir-vulncheck-fix branch from f2ed07a to 2a0603a Compare May 12, 2026 17:03
cstockton and others added 3 commits May 14, 2026 12:04
Resolved all findings from govulncheck, all of which were fixed
with a go version upgrade.

I changed vulncheck filter to parse the output of the command line
instead of the JSON. This is because the CLI does a great deal of
post processing after the fact that I did not want to emulate in
the parser. It was much simpler to parse the text output. If it
changes in the future the parser is simple to change. The parser
is also much more strict, it expects vuln list or a success msg
which should prevent silently passing with vulns found.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants