Skip to content

Commit bd63653

Browse files
committed
feat: export findings to securityhub
1 parent 06c9b57 commit bd63653

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

.github/workflows/reusable-cve-scan.yml

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -219,16 +219,11 @@ jobs:
219219
GIT_SHA=$(git rev-parse HEAD)
220220
221221
jq 'map(
222-
.Id = (
223-
"'"${GITHUB_REPOSITORY}"'@'"$GIT_SHA"'" + "-" + .Resources[0].Details.Other["CVE ID"]
224-
) |
225-
.GeneratorId = (
226-
"AquaSecurity/Trivy/" + .Resources[0].Details.Other["CVE ID"]
227-
) |
222+
.Id = ("'"${GITHUB_REPOSITORY}"'@'"$GIT_SHA"'" + "-" + .Resources[0].Details.Other["CVE ID"]) |
223+
.GeneratorId = ("AquaSecurity/Trivy/" + .Resources[0].Details.Other["CVE ID"]) |
228224
.ProductName = "Aqua Security" |
229225
.ProductFields["Product Name"] = "Aqua Security" |
230-
.ProductFields["ci/source"] = "github-actions" |
231-
)' trivy-findings.json > trivy-findings-fixed.json
226+
.ProductFields["ci/source"] = "github-actions")' trivy-findings.json > trivy-findings-fixed.json
232227
mv trivy-findings-fixed.json trivy-findings.json
233228
234229
# Debug: print a summary of the findings being sent to Security Hub

0 commit comments

Comments
 (0)