Make SKIP case-insensitive
This commit is contained in:
parent
21a806b491
commit
d92fcd2ab8
@ -254,7 +254,11 @@ func AnalyzeScript(r *interp.Runner, fl *syntax.File) ([]Finding, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
for i, val := range valSlice {
|
for i, val := range valSlice {
|
||||||
if val != "SKIP" && len(val) != 64 {
|
if strings.EqualFold(val, "SKIP") {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
|
if len(val) != 64 {
|
||||||
findings = append(findings, Finding{
|
findings = append(findings, Finding{
|
||||||
ItemType: "element",
|
ItemType: "element",
|
||||||
ItemName: name,
|
ItemName: name,
|
||||||
@ -264,7 +268,6 @@ func AnalyzeScript(r *interp.Runner, fl *syntax.File) ([]Finding, error) {
|
|||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
if val != "SKIP" {
|
|
||||||
_, err := hex.DecodeString(val)
|
_, err := hex.DecodeString(val)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
findings = append(findings, Finding{
|
findings = append(findings, Finding{
|
||||||
@ -276,7 +279,6 @@ func AnalyzeScript(r *interp.Runner, fl *syntax.File) ([]Finding, error) {
|
|||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
case "backup":
|
case "backup":
|
||||||
mustBeArray(val, name, &findings)
|
mustBeArray(val, name, &findings)
|
||||||
case "scripts":
|
case "scripts":
|
||||||
|
Loading…
Reference in New Issue
Block a user