mirror of
https://github.com/projectdiscovery/nuclei.git
synced 2025-12-25 17:05:29 +00:00
Merge pull request #1659 from projectdiscovery/unkown-severity-value
Added unknown as severity value when it is not known
This commit is contained in:
commit
d38033014f
@ -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
|
||||
|
||||
|
||||
@ -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 {
|
||||
|
||||
@ -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) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user