Skip to content

Commit

Permalink
fix merge conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
tstromberg committed Oct 7, 2024
1 parent 2485a59 commit bfcd872
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions pkg/render/strings.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,21 @@ var riskLevels = map[int]string{
4: "CRITICAL", // critical: certainly malware
}

func briefRiskColor(level string) string {
switch level {
case "LOW":
return color.HiGreenString("LOW")
case "MEDIUM", "MED":
return color.HiYellowString("MED")
case "HIGH":
return color.HiRedString("HIGH")
case "CRITICAL", "CRIT":
return color.HiMagentaString("CRIT")
default:
return color.WhiteString(level)
}
}

type StringMatches struct {
w io.Writer
}
Expand All @@ -58,6 +73,10 @@ type Match struct {
Strings []string
}

func (r StringMatches) Scanning(_ context.Context, path string) {
fmt.Fprintf(r.w, "🔎 Scanning %q\n", path)
}

func (r StringMatches) File(_ context.Context, fr *malcontent.FileReport) error {
if len(fr.Behaviors) == 0 {
return nil
Expand Down

0 comments on commit bfcd872

Please sign in to comment.