Skip to content

Commit

Permalink
Fix failing security scan issue (#460)
Browse files Browse the repository at this point in the history
* Updated issue creation logic
* Create github issue per version
* add changelog
* push fix
* Merge remote-tracking branch 'origin' into trivy-create-one-gh-issue-per-version
* remove extra printf
* Merge branch 'master' of https://github.com/solo-io/go-utils into trivy-create-one-gh-issue-per-version
* changelog
  • Loading branch information
saiskee authored Jul 26, 2021
1 parent fde3f8f commit 40eb35c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
6 changes: 6 additions & 0 deletions changelog/v0.21.14/security-scan-create-github-issue.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
changelog:
- type: FIX
issueLink: https://github.com/solo-io/gloo/issues/5048
resolvesIssue: false
description: >
Fixes issue where security scanning will fail and error when scanning releases that failed mid-release.
8 changes: 4 additions & 4 deletions securityscanutils/securityscan.go
Original file line number Diff line number Diff line change
Expand Up @@ -170,12 +170,12 @@ func (r *SecurityScanRepo) RunMarkdownScan(ctx context.Context, client *github.C
if err != nil {
return eris.Wrapf(err, "error running image scan on image %s", imageWithRepo)
}
trivyScanMd, err := ioutil.ReadFile(output)
if err != nil {
return eris.Wrapf(err, "error reading trivy markdown scan file %s to generate github issue", output)
}

if vulnFound {
trivyScanMd, err := ioutil.ReadFile(output)
if err != nil {
return eris.Wrapf(err, "error reading trivy markdown scan file %s to generate github issue", output)
}
vulnerabilityMd += fmt.Sprintf("# %s\n\n %s\n\n", imageWithRepo, trivyScanMd)
}

Expand Down

0 comments on commit 40eb35c

Please sign in to comment.