(command string, re *regexp.Regexp, id int, desc string, fullyUnquoted bool)
| 373 | } |
| 374 | |
| 375 | func singleREFinding(command string, re *regexp.Regexp, id int, desc string, fullyUnquoted bool) []SecurityFinding { |
| 376 | target := command |
| 377 | if fullyUnquoted { |
| 378 | target = ExtractQuotedContent(command).FullyUnquoted |
| 379 | } else { |
| 380 | target = ExtractQuotedContent(command).WithDoubleQuotes |
| 381 | } |
| 382 | if re.MatchString(target) { |
| 383 | return []SecurityFinding{{ID: id, Description: desc}} |
| 384 | } |
| 385 | return nil |
| 386 | } |
| 387 | |
| 388 | func singleRawFinding(command string, re *regexp.Regexp, id int, desc string) []SecurityFinding { |
| 389 | if re.MatchString(command) { |
no test coverage detected