From 6d9c525946342ff9c619d72ebee1500805bbbdc9 Mon Sep 17 00:00:00 2001 From: Ice3man Date: Mon, 28 Feb 2022 22:29:04 +0530 Subject: [PATCH 1/2] Added unknown as severity value when it is not known --- v2/pkg/model/types/severity/severity.go | 3 +++ v2/pkg/model/types/severity/severity_test.go | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/v2/pkg/model/types/severity/severity.go b/v2/pkg/model/types/severity/severity.go index 5c3b28150..d840d9558 100644 --- a/v2/pkg/model/types/severity/severity.go +++ b/v2/pkg/model/types/severity/severity.go @@ -24,6 +24,8 @@ const ( High // name:critical Critical + // name:unknown + Unknown limit ) @@ -33,6 +35,7 @@ var severityMappings = map[Severity]string{ Medium: "medium", High: "high", Critical: "critical", + Unknown: "unknown", } func GetSupportedSeverities() Severities { diff --git a/v2/pkg/model/types/severity/severity_test.go b/v2/pkg/model/types/severity/severity_test.go index 6ba472388..30ff4be94 100644 --- a/v2/pkg/model/types/severity/severity_test.go +++ b/v2/pkg/model/types/severity/severity_test.go @@ -26,7 +26,7 @@ func TestYamlUnmarshalFail(t *testing.T) { func TestGetSupportedSeverities(t *testing.T) { severities := GetSupportedSeverities() - assert.Equal(t, severities, Severities{Info, Low, Medium, High, Critical}) + assert.Equal(t, severities, Severities{Info, Low, Medium, High, Critical, Unknown}) } func testUnmarshal(t *testing.T, unmarshaller func(data []byte, v interface{}) error, payloadCreator func(value string) string) { From 7ccd2edaca4b019db069fd01e8348d485b828fc5 Mon Sep 17 00:00:00 2001 From: sandeep Date: Tue, 1 Mar 2022 00:15:44 +0530 Subject: [PATCH 2/2] readme update --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 4b516c40d..632087b73 100644 --- a/README.md +++ b/README.md @@ -115,8 +115,8 @@ FILTERING: -eid, -exclude-id string[] templates to exclude based on template ids (comma-separated, file) -it, -include-templates string[] templates to be executed even if they are excluded either by default or configuration -et, -exclude-templates string[] template or template directory to exclude (comma-separated, file) - -s, -severity value[] templates to run based on severity. Possible values: info, low, medium, high, critical - -es, -exclude-severity value[] templates to exclude based on severity. Possible values: info, low, medium, high, critical + -s, -severity value[] templates to run based on severity. Possible values: info, low, medium, high, critical, unknown + -es, -exclude-severity value[] templates to exclude based on severity. Possible values: info, low, medium, high, critical, unknown -pt, -type value[] templates to run based on protocol type. Possible values: dns, file, http, headless, network, workflow, ssl, websocket, whois -ept, -exclude-type value[] templates to exclude based on protocol type. Possible values: dns, file, http, headless, network, workflow, ssl, websocket, whois