set status to low when warn-only is set to true
This commit is contained in:
+1
-1
@@ -609,9 +609,9 @@ function run() {
|
|||||||
}
|
}
|
||||||
const scopedChanges = (0, filter_1.filterChangesByScopes)(config.fail_on_scopes, changes);
|
const scopedChanges = (0, filter_1.filterChangesByScopes)(config.fail_on_scopes, changes);
|
||||||
const filteredChanges = (0, filter_1.filterAllowedAdvisories)(config.allow_ghsas, scopedChanges);
|
const filteredChanges = (0, filter_1.filterAllowedAdvisories)(config.allow_ghsas, scopedChanges);
|
||||||
let minSeverity = config.fail_on_severity;
|
|
||||||
const failOnSeverityParams = config.fail_on_severity;
|
const failOnSeverityParams = config.fail_on_severity;
|
||||||
const warnOnly = config.warn_only;
|
const warnOnly = config.warn_only;
|
||||||
|
let minSeverity = 'low';
|
||||||
// If failOnSeverityParams is not set or warnOnly is true, the minSeverity is low, to allow all vulnerabilities to be reported as warnings
|
// If failOnSeverityParams is not set or warnOnly is true, the minSeverity is low, to allow all vulnerabilities to be reported as warnings
|
||||||
if (failOnSeverityParams && !warnOnly) {
|
if (failOnSeverityParams && !warnOnly) {
|
||||||
minSeverity = failOnSeverityParams;
|
minSeverity = failOnSeverityParams;
|
||||||
|
|||||||
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
@@ -87,9 +87,9 @@ async function run(): Promise<void> {
|
|||||||
scopedChanges
|
scopedChanges
|
||||||
)
|
)
|
||||||
|
|
||||||
let minSeverity = config.fail_on_severity
|
|
||||||
const failOnSeverityParams = config.fail_on_severity
|
const failOnSeverityParams = config.fail_on_severity
|
||||||
const warnOnly = config.warn_only
|
const warnOnly = config.warn_only
|
||||||
|
let minSeverity: Severity = 'low'
|
||||||
// If failOnSeverityParams is not set or warnOnly is true, the minSeverity is low, to allow all vulnerabilities to be reported as warnings
|
// If failOnSeverityParams is not set or warnOnly is true, the minSeverity is low, to allow all vulnerabilities to be reported as warnings
|
||||||
if (failOnSeverityParams && !warnOnly) {
|
if (failOnSeverityParams && !warnOnly) {
|
||||||
minSeverity = failOnSeverityParams
|
minSeverity = failOnSeverityParams
|
||||||
|
|||||||
Reference in New Issue
Block a user