bug(template): Message
field not escaped in asff.tpl
#7400
Labels
kind/bug
Categorizes issue or PR as related to a bug.
Message
field not escaped in asff.tpl
#7400
Discussed in #7391
Originally posted by aliaksxssv August 26, 2024
Description
ASFF report contains a Message field with double quotes inside the value. This makes using jq impossible as it causes error:
We need jq to adjust report before submitting to the AWS SecurityHub:
ASFF report snippet:
"ProductFields": { "Product Name": "Trivy" }, "Resources": [ { "Type": "Other", "Id": "templates/cronjob.yaml", "Partition": "aws", "Region": "", "Details": { "Other": { "Message": "container "helm-cronjob" of cronjob "helm-cronjob" in "default" namespace should specify a seccomp profile", "Filename": "templates/cronjob.yaml", "StartLine": "0", "EndLine": "0" } } } ], "RecordState": "ACTIVE"
Desired Behavior
escape function should be applied as it was done before for the Title field
Actual Behavior
No escape function
Reproduction Steps
Target
None
Scanner
None
Output Format
None
Mode
None
Debug Output
Operating System
any
Version
Checklist
trivy clean --all
The text was updated successfully, but these errors were encountered: