Skip to content

Commit

Permalink
Fix filling cve-ids on empty stdin (#92)
Browse files Browse the repository at this point in the history
  • Loading branch information
RamanaReddy0M authored Feb 18, 2024
1 parent 8fa4207 commit 237522b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pkg/runner/runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,10 @@ func ParseOptions() *Options {
if err != nil {
gologger.Fatal().Msgf("couldn't read stdin: %s\n", err)
}
options.CveIds = append(options.CveIds, strings.Split(strings.TrimSpace(string(bin)), "\n")...)
stdinStr := strings.TrimSpace(string(bin))
if stdinStr != "" {
options.CveIds = append(options.CveIds, strings.Split(stdinStr, "\n")...)
}
}

// convert cve-ids and cwe-ids to uppercase
Expand Down

0 comments on commit 237522b

Please sign in to comment.