From 731e67eca2b2679820ee844e0cd3942fcb9c7526 Mon Sep 17 00:00:00 2001 From: Federico Builes Date: Tue, 31 May 2022 17:08:22 +0200 Subject: [PATCH] Add filtering by low severity as the default. --- src/config.ts | 2 +- src/main.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/config.ts b/src/config.ts index 45e50ab..f8e4052 100644 --- a/src/config.ts +++ b/src/config.ts @@ -17,7 +17,7 @@ type ConfigurationOptions = { export function readConfigFile(filePath: string = CONFIG_FILEPATH): ConfigurationOptions { // By default we want to fail on all severities and allow all licenses. var defaultOptions: ConfigurationOptions = { - fail_on_severity: "all", + fail_on_severity: "low", allow_licenses: ['all'], deny_licenses: [] } diff --git a/src/main.ts b/src/main.ts index ac85b65..c003bc6 100644 --- a/src/main.ts +++ b/src/main.ts @@ -32,7 +32,7 @@ async function run(): Promise { let filteredChanges = filterChangesBySeverity(minSeverity as Severity, changes) - for (const change of changes) { + for (const change of filteredChanges) { if ( change.change_type === 'added' && change.vulnerabilities !== undefined &&