Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include target value in Sarif template ruleID #991

Merged
merged 2 commits into from
May 13, 2021
Merged

Include target value in Sarif template ruleID #991

merged 2 commits into from
May 13, 2021

Conversation

rahul2393
Copy link
Contributor

No description provided.

@codecov
Copy link

codecov bot commented May 13, 2021

Codecov Report

Merging #991 (fa93cde) into main (a00d719) will decrease coverage by 6.32%.
The diff coverage is 52.66%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #991      +/-   ##
==========================================
- Coverage   68.50%   62.18%   -6.33%     
==========================================
  Files          57       65       +8     
  Lines        2210     2626     +416     
==========================================
+ Hits         1514     1633     +119     
- Misses        564      858     +294     
- Partials      132      135       +3     
Impacted Files Coverage Δ
pkg/commands/artifact/config.go 81.81% <ø> (ø)
pkg/commands/artifact/fs.go 0.00% <0.00%> (ø)
pkg/commands/artifact/image.go 0.00% <0.00%> (ø)
pkg/commands/artifact/repository.go 0.00% <0.00%> (ø)
pkg/commands/artifact/run.go 0.00% <0.00%> (ø)
pkg/commands/artifact/wire_gen.go 0.00% <0.00%> (ø)
pkg/commands/client/config.go 79.31% <ø> (ø)
pkg/commands/client/run.go 0.00% <0.00%> (ø)
pkg/commands/client/wire_gen.go 0.00% <0.00%> (ø)
pkg/commands/config/cache.go 100.00% <ø> (ø)
... and 42 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 083c157...fa93cde. Read the comment docs.

@@ -20,7 +20,7 @@
,
{{- end }}
{
"id": "{{ .VulnerabilityID }}/{{ .PkgName }}/{{ .InstalledVersion }}",
"id": "{{ .VulnerabilityID }}/{{ escapeString (toPathUri $result.Target) }}/{{ .PkgName }}/{{ .InstalledVersion }}",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I recommend using toJson from sprig.

Suggested change
"id": "{{ .VulnerabilityID }}/{{ escapeString (toPathUri $result.Target) }}/{{ .PkgName }}/{{ .InstalledVersion }}",
"id": {{ printf "%s: %s-%s %s" $result.Target .PkgName .InstalledVersion .VulnerabilityID | toJson }},

@knqyf263 knqyf263 merged commit eaf2da2 into aquasecurity:main May 13, 2021
liamg pushed a commit that referenced this pull request Jun 7, 2022
* Include target value in Sarif template ruleID

* Fix format
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants