!feat: default to project settings for risk domain thresholds#52
Merged
Conversation
BREAKING CHANGE: Individual risk domain threshold values can be set with command line options, which now accept values between 0 and 100, inclusive. Previously, the accepted values were between 0 and 99, inclusive. Closes #46
4 tasks
kylewillmon
approved these changes
May 26, 2022
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes in this PR allow thresholds for the five risk domains to be set individually in several ways. They can be set at the Phylum project level from either the Phylum CLI or the web UI. They can also be set by
phylum-cioptions (e.g.,--vul-threshold,--mal-threshold, etc.). The default is to use the project level setting unless overridden by a value specified by aphylum-cioption. A default secure value (100) will be used when neither of these sources are used to set the value.Additional changes made:
requeststimeout value was increased to 10.0 secondsBREAKING CHANGE: Individual risk domain threshold values can be set with command line options, which now accept values between 0 and 100, inclusive. Previously, the accepted values were between 0 and 99, inclusive.
Closes #46
Checklist
closes #<issueNum>in description above)?Have you created sufficient tests?phylum-cicommand line arguments (e.g.,--vul-threshold)Example Output
Each of these examples was taken against a lockfile named
requirementst-dev.txt, containing:This first output is with a script command of:
phylum-ci --lockfile requirements-dev.txt --new-deps-only -lt 65and a disabled "Vulnerability Risk" threshold in the project settings:
This second output is with a script command of:
phylum-ci --lockfile requirements-dev.txt --new-deps-only -vt 60and a disabled "License Risk" threshold in the project settings:
This third output is with a script command of:
phylum-ci --lockfile requirements-dev.txt --new-deps-only -vt 60, an enabled "License Risk" threshold in the project settings of 75, and an enabled "Vulnerability Risk" threshold in the project settings of 50: