Skip to content

Commit

Permalink
chore(comments): include gitlab fix (#119)
Browse files Browse the repository at this point in the history
Also format comments markdown to support gitlab

Co-authored-by: oranmoshai <oran.moshai@aquasec.com>
  • Loading branch information
oranmoshai and oranmoshai authored Jun 6, 2022
1 parent ee9a723 commit adf2829
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ go 1.18
require (
github.com/aquasecurity/fanal v0.0.0-20220503163617-7b81bb08565f
github.com/aquasecurity/go-dep-parser v0.0.0-20220503151658-d316f5cc2cff
github.com/aquasecurity/go-git-pr-commenter v0.0.0-20220530100252-61bd9b3af2df
github.com/aquasecurity/go-git-pr-commenter v0.0.0-20220602114622-264c8b5aadff
github.com/aquasecurity/trivy v0.27.1-0.20220426130527-b6baa65ff20b
github.com/aquasecurity/trivy-db v0.0.0-20220327074450-74195d9604b2
github.com/mitchellh/mapstructure v1.5.0
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -252,8 +252,8 @@ github.com/aquasecurity/go-dep-parser v0.0.0-20220503151658-d316f5cc2cff h1:YNlz
github.com/aquasecurity/go-dep-parser v0.0.0-20220503151658-d316f5cc2cff/go.mod h1:7EOQWQmyavVPY3fScbbPdd3dB/b0Q4ZbJ/NZCvNKrLs=
github.com/aquasecurity/go-gem-version v0.0.0-20201115065557-8eed6fe000ce h1:QgBRgJvtEOBtUXilDb1MLi1p1MWoyFDXAu5DEUl5nwM=
github.com/aquasecurity/go-gem-version v0.0.0-20201115065557-8eed6fe000ce/go.mod h1:HXgVzOPvXhVGLJs4ZKO817idqr/xhwsTcj17CLYY74s=
github.com/aquasecurity/go-git-pr-commenter v0.0.0-20220530100252-61bd9b3af2df h1:+XkzXb+3fykN/cG6/agPyaUrNgM+6AHeQy8ZFYwfbWY=
github.com/aquasecurity/go-git-pr-commenter v0.0.0-20220530100252-61bd9b3af2df/go.mod h1:qqqStAf73A6em7ZqAIKXFSgLp3dm5EQaPFfuLU5dU7E=
github.com/aquasecurity/go-git-pr-commenter v0.0.0-20220602114622-264c8b5aadff h1:c1iIdlM+tpf+ccKJ2OzqXECzsXihFfU7q42Geyl4zEE=
github.com/aquasecurity/go-git-pr-commenter v0.0.0-20220602114622-264c8b5aadff/go.mod h1:qqqStAf73A6em7ZqAIKXFSgLp3dm5EQaPFfuLU5dU7E=
github.com/aquasecurity/go-npm-version v0.0.0-20201110091526-0b796d180798 h1:eveqE9ivrt30CJ7dOajOfBavhZ4zPqHcZe/4tKp0alc=
github.com/aquasecurity/go-npm-version v0.0.0-20201110091526-0b796d180798/go.mod h1:hxbJZtKlO4P8sZ9nztizR6XLoE33O+BkPmuYQ4ACyz0=
github.com/aquasecurity/go-pep440-version v0.0.0-20210121094942-22b2f8951d46 h1:vmXNl+HDfqqXgr0uY1UgK1GAhps8nbAAtqHNBcgyf+4=
Expand Down
16 changes: 8 additions & 8 deletions pkg/buildClient/comments.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,21 +69,21 @@ func prComments(buildSystem string, result []*buildsecurity.Result) error {

func returnSecretMsg(r *buildsecurity.Result) string {
return fmt.Sprintf("### :warning: Aqua detected sensitive data in your code"+
"\n<b>Category:</b> %s "+
"\n<b>Description:</b> %s "+
"\n<b>Severity:</b> %s "+
"\n<b>Match:</b> %s",
" \n**Category:** %s "+
" \n**Description:** %s "+
" \n**Severity:** %s "+
" \n**Match:** %s",
r.Resource,
r.Title,
strings.ReplaceAll(r.Severity.String(), "SEVERITY_", ""),
r.Message)
}
func returnMisconfMsg(r *buildsecurity.Result) string {
return fmt.Sprintf("### :warning: Aqua detected misconfiguration in your code"+
"\n<b>Misconfiguration ID:</b> %s "+
"\n<b>Check Name:</b> %s "+
"\n<b>Severity:</b> %s "+
"\n<b>Message:</b> %s",
" \n**Misconfiguration ID:** %s "+
" \n**Check Name:** %s "+
" \n**Severity:** %s "+
" \n**Message:** %s",
r.AVDID,
r.Title,
strings.ReplaceAll(r.Severity.String(), "SEVERITY_", ""),
Expand Down

0 comments on commit adf2829

Please sign in to comment.