Skip to content

Commit

Permalink
cmd/vulnreport: skip issues that are out of scope
Browse files Browse the repository at this point in the history
Issues labeled OUT_OF_SCOPE should not get a report at all,
so skip them in "vulnreport create".

Change-Id: Ic7051c1ca96e1836653f4f5fc5633a771ccec805
Reviewed-on: https://go-review.googlesource.com/c/vulndb/+/592455
Reviewed-by: Damien Neil <[email protected]>
LUCI-TryBot-Result: Go LUCI <[email protected]>
  • Loading branch information
tatianab committed Jun 14, 2024
1 parent a5e4183 commit 12d366a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cmd/vulnreport/creator.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,10 @@ func (c *creator) skip(input any) string {
}

func skip(iss *issues.Issue, x *xrefer) string {
if iss.HasLabel(labelOutOfScope) {
return "out of scope"
}

if iss.HasLabel(labelDuplicate) {
return "duplicate issue"
}
Expand Down Expand Up @@ -256,6 +260,7 @@ const (
labelFirstParty = "first party"
labelPossibleDuplicate = "possible duplicate"
labelPossiblyNotGo = "possibly not Go"
labelOutOfScope = "excluded: OUT_OF_SCOPE"
)

func excludedReason(iss *issues.Issue) report.ExcludedReason {
Expand Down

0 comments on commit 12d366a

Please sign in to comment.