mirror of https://github.com/daffainfo/nuclei.git
Merge pull request #996 from gano3s/dev
[issue] 995 - YAML Unmarshal error in reporting templatedev
commit
5e50d469e7
|
@ -1,7 +1,9 @@
|
|||
# to specify which severities should be reported
|
||||
#allow-list:
|
||||
# severity: high,critical
|
||||
# severity: "critical, high"
|
||||
# to specify which severities should be excluded from reporting
|
||||
#deny-list:
|
||||
# severity: low
|
||||
# severity: "info, low, medium"
|
||||
|
||||
# github contains configuration options for github issue tracker
|
||||
#github:
|
||||
|
|
|
@ -11,6 +11,18 @@ func (severities Severities) String() string {
|
|||
return strings.Join(severities.ToStringArray(), ", ")
|
||||
}
|
||||
|
||||
func (severities *Severities) UnmarshalYAML(unmarshal func(interface{}) error) error {
|
||||
var marshalledSeverities string
|
||||
if err := unmarshal(&marshalledSeverities); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if err := severities.Set(marshalledSeverities); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (severities *Severities) Set(value string) error {
|
||||
inputSeverities := toStringSlice(value)
|
||||
|
||||
|
|
Loading…
Reference in New Issue