-
Notifications
You must be signed in to change notification settings - Fork 353
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: error if configuration file has unknown properties (#1249)
Currently the scanner does not check if there were unrecognized properties when loading configuration files, meaning that typos can easily slip through; to help avoid this, I've modified `tryLoadConfig` to return an error if there are any undecoded keys in the metadata. While this could cause existing configs to start erroring, I don't think this should be considered a breaking change as such configurations would inherently causing different behaviour than what was desired and thus be a downstream bug themselves. This will also mean that old versions of the scanner going forward would not be compatible with configs for even newer versions of the scanner that introduce new config properties, which is could be a little annoying but I don't think outweighs the benefit of this validation especially given such configurations likewise would result in different behaviour since the old scanner version would not know what to do with the new configuration option. Resolves #1098
- Loading branch information
Showing
12 changed files
with
136 additions
and
1 deletion.
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
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,24 @@ | ||
RustVersionOverride = "1.2.3" | ||
|
||
[[PackageOverrides]] | ||
ecosystem = "npm" | ||
skip = true | ||
license.override = ["0BSD"] | ||
|
||
[[PackageOverrides]] | ||
ecosystem = "Packagist" | ||
license.override = ["0BSD"] | ||
|
||
[[PackageOverrides]] | ||
ecosystem = "Alpine" | ||
Name = "musl" | ||
license.override = ["UNKNOWN"] | ||
|
||
[[PackageOverrides]] | ||
ecosystem = "Alpine" | ||
name = "musl-utils" | ||
license.skip = true | ||
|
||
[[IgnoredVulns]] | ||
id = "GO-2022-0274" | ||
ignoreuntil = 2020-01-01 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
[[IgnoredVulns]] | ||
id = "GHSA-jgvc-jfgh-rjvv" | ||
ignoreUntilTime = 2024-08-02 # whoops, should be "ignoreUntil" | ||
reason = "..." |
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,4 @@ | ||
[[IgnoredVulns]] | ||
id = "GHSA-jgvc-jfgh-rjvv" | ||
ignoreUntiI = 2024-08-02 # whoops, should be "ignoreUntil" | ||
reason = "..." |
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,4 @@ | ||
[[IgnoredVulns]] | ||
id = "GHSA-jgvc-jfgh-rjvv" | ||
ignoreUntil = 2024-08-02 | ||
reasoning = "..." # whoops, should be "reason" |
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,4 @@ | ||
[[PackageOverrides]] | ||
ecosystem = "npm" | ||
skip = true # whoops, should be "ignore" | ||
license.override = ["0BSD"] |
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,3 @@ | ||
[[PackageOverrides]] | ||
ecosystem = "npm" | ||
license.skip = false # whoops, should be "license.ignore" |
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 @@ | ||
RustVersionOverride = "1.2.3" # whoops, not supported |
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,5 @@ | ||
RustVersionOverride = "1.2.3" # whoops, not supported | ||
|
||
[[PackageOverrides]] | ||
ecosystem = "npm" | ||
skip = true # whoops, should be "ignore" |