Skip to content

x/vuln: add support for silencing vulnerability findings with govulncheck #61211

Open
@julieqiu

Description

@julieqiu

This is a tracking issue to add support for silencing vulnerability findings with govulncheck.

#59507 is related.

Activity

added
NeedsFixThe path to resolution is known, but the work has not been done.
on Jul 8, 2023
added a commit that references this issue on Jun 5, 2024
rikatz

rikatz commented on Jun 29, 2024

@rikatz

@julieqiu is there someone working on this feature? Otherwise, I can try working on something to support this exclude flag :) Not sure I am the best person to, but happy to help!

self-assigned this
on Jun 29, 2024

2 remaining items

tianon

tianon commented on Jun 29, 2024

@tianon
Contributor

OpenVEX is workable here, but kind of annoying for the same reasons the current output format struggles with: defining an appropriate purl is hard (I suppose worst case we could use a bogus placeholder, like govulncheck itself is doing)

If we were to provide an input VEX, what would the VEX output look like? Would it just copy entries from the input verbatim for the output where relevant?

zpavlinovic

zpavlinovic commented on Jun 29, 2024

@zpavlinovic
Contributor

So is more like a "skip CVE" (a la go test -skip)

Then OpenVex is fine here.

OpenVEX is workable here, but kind of annoying for the same reasons the current output format struggles with: defining an appropriate purl is hard (I suppose worst case we could use a bogus placeholder, like govulncheck itself is doing)

We are in the process of figuring out the product fields for OpenVex. That would need to be done first.

If we were to provide an input VEX, what would the VEX output look like? Would it just copy entries from the input verbatim for the output where relevant?

From the top of my head, we would take the <OSV, product> pairs that are classified as not_affected and skip analyzing for those. Everything else would be the same I guess. I would have to think more.

PushkarJ

PushkarJ commented on Jun 29, 2024

@PushkarJ

@zpavlinovic Suggestion on product fields:

  • It might make sense to default it to module name in go.mod file e.g. https://github.com/kubernetes/kubernetes/blob/master/go.mod#L7
  • It would also be super-useful to allow users to define a comma-listed list of products. For example, in case of kubernetes, all the code in core kubernetes is in k/k but we would like to add all the core k8s release images under product potentially. This is mainly because scanners that will consume openvex output will be run on release images by end users
PushkarJ

PushkarJ commented on Jun 29, 2024

@PushkarJ

Btw, for anyone trying this out for their golang projects, shared a few experiments with k/k here: kubernetes/sig-security#116 (comment)

zpavlinovic

zpavlinovic commented on Jul 1, 2024

@zpavlinovic
Contributor

@zpavlinovic Suggestion on product fields:

This seems to be in stark contrast to what has been recently proposed.

IMO, what is proposed there makes more sense.

  • It would also be super-useful to allow users to define a comma-listed list of products. For example, in case of kubernetes, all the code in core kubernetes is in k/k but we would like to add all the core k8s release images under product potentially. This is mainly because scanners that will consume openvex output will be run on release images by end users

I think it is best for users to post-process the govulncheck output themselves. Customizing the output can turn into a rabbit hole with flags and different user needs.

puerco

puerco commented on Jul 9, 2024

@puerco

Hey all I am one of the OpenVEX maintainers. Thanks for getting this discussion going!

I added some comments about the product/subcomponent values over in #68152 (comment)

The TLDR: As @PushkarJ suggests the product, when govulncheck is looking at the source, the product should be the package URL (purl) of the main module. And the dependency with the vulnerability would go in the subcomponent.

When it comes to analyzing a binary, just use a file: URI but specify the file hashes. Our tooling will prefer them when matching with data SBOMs, etc that content-addresses artifacts with hashes. This gets rid of using purls for binaries as @tianon correctly mentioned above. We prefer not using a purl in a case like this.

See the examples on the comment in #68152

self-assigned this
on Nov 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

NeedsFixThe path to resolution is known, but the work has not been done.vulncheck or vulndbIssues for the x/vuln or x/vulndb repo

Type

No type

Projects

No projects

Relationships

None yet

    Development

    No branches or pull requests

      Participants

      @tianon@zpavlinovic@PushkarJ@puerco@julieqiu

      Issue actions

        x/vuln: add support for silencing vulnerability findings with govulncheck · Issue #61211 · golang/go