You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[INFO] 16:03:22.151 Sensor Import external issues report from SARIF file.
[WARNING] 16:03:22.163 Failed to import an issue raised by tool Trivy, error: Illegal character in path at index 20: .run/abcdefg-dev-api (dev-ab).run.xml
SARIF1002: runs[0].results[0].locations[0].physicalLocation.artifactLocation.uri: The string '.run/abcdefg-dev-api (dev-ab).run.xml' is not a valid URI reference. URIs must conform to RFC 3986.
Reproduction Steps
create a file having a Trivy issue with a space in its name
kind/bugCategorizes issue or PR as related to a bug.
1 participant
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Description
SARIF report produced by Trivy may contain some invalid URI (e.g. when a file having issue has a a space in its filename).
A PR has been created: #7645
Desired Behavior
SARIF report should comply with SARIF 2.1.0 specification.
Actual Behavior
Excerpt of the SARIF json created by Trivy:
Invalid reports cannot be imported using SonarQube SARIF import:
The report is also failing SARIF Validator:
Reproduction Steps
Target
None
Scanner
None
Output Format
SARIF
Mode
Standalone
Debug Output
trivy convert --format sarif --debug --output target/reports/jenkins/trivy-report-security-analysis-sarif.json target/reports/jenkins/trivy-report-security-analysis.json 2024-10-03T12:16:24Z DEBUG Cache dir dir="/.cache/trivy" 2024-10-03T12:16:24Z DEBUG Parsed severities severities=[UNKNOWN LOW MEDIUM HIGH CRITICAL] 2024-10-03T12:16:24Z DEBUG Writing report to output...
Operating System
registry.access.redhat.com/ubi8/openjdk-17
Version
Checklist
trivy clean --all
Beta Was this translation helpful? Give feedback.
All reactions