MCPcopy Create free account
hub / github.com/GongShichen/LuminaCode / singleREFinding

Function singleREFinding

tools/bash/security.go:375–386  ·  view source on GitHub ↗
(command string, re *regexp.Regexp, id int, desc string, fullyUnquoted bool)

Source from the content-addressed store, hash-verified

373}
374
375func 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
388func singleRawFinding(command string, re *regexp.Regexp, id int, desc string) []SecurityFinding {
389 if re.MatchString(command) {

Callers 1

RunAllSecurityChecksFunction · 0.85

Calls 1

ExtractQuotedContentFunction · 0.85

Tested by

no test coverage detected