-
Notifications
You must be signed in to change notification settings - Fork 378
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: warn if a vulnerability is ignored multiple times in the same c…
…onfig (#1377) Currently if you have multiple ignores for a vulnerability, we just silently use the first one; this has us instead print a warning to make it more obvious when that occurs. I've not had it error as it doesn't feel like a big enough deal to be worth erroring, though maybe that would be better as I can't think of an actual reason to have duplicate entries 🤔 Resolves #1367
- Loading branch information
Showing
6 changed files
with
54 additions
and
7 deletions.
There are no files selected for viewing
This file contains 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
10 changes: 10 additions & 0 deletions
10
cmd/osv-scanner/fixtures/osv-scanner-duplicate-config.toml
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
[[IgnoredVulns]] | ||
id = "GO-2022-0274" | ||
ignoreuntil = 2020-01-01 | ||
|
||
[[IgnoredVulns]] | ||
id = "GO-2022-0274" | ||
ignoreuntil = 2022-01-01 | ||
|
||
[[IgnoredVulns]] | ||
id = "GHSA-whgm-jr23-g3j9" |
This file contains 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
This file contains 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
This file contains 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
This file contains 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