set status to low when warn-only is set to true

This commit is contained in:
tgrall
2024-01-28 14:35:44 +01:00
parent d6f324d18a
commit f91404ca86
3 changed files with 3 additions and 3 deletions

2
dist/index.js generated vendored
View File

@@ -609,9 +609,9 @@ function run() {
}
const scopedChanges = (0, filter_1.filterChangesByScopes)(config.fail_on_scopes, changes);
const filteredChanges = (0, filter_1.filterAllowedAdvisories)(config.allow_ghsas, scopedChanges);
let minSeverity = config.fail_on_severity;
const failOnSeverityParams = config.fail_on_severity;
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 && !warnOnly) {
minSeverity = failOnSeverityParams;

2
dist/index.js.map generated vendored

File diff suppressed because one or more lines are too long

View File

@@ -87,9 +87,9 @@ async function run(): Promise<void> {
scopedChanges
)
let minSeverity = config.fail_on_severity
const failOnSeverityParams = config.fail_on_severity
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 && !warnOnly) {
minSeverity = failOnSeverityParams