Summary
This PR introduces support for the SARIF (Static Analysis Results Interchange Format) output format.
By adding the --output sarif flag (or sarif to the .xeol.yaml config), users can now seamlessly integrate Xeol's End-of-Life dependency findings directly into modern CI/CD security dashboards, such as GitHub Advanced Security (GHAS) or GitLab Security.
Changes Made
- Added a new
sarifFormat to the internal format parsers and presenter options.
- Implemented a new
sarif.Presenter utilizing the github.com/owenrumney/go-sarif library to ensure strict compliance with the SARIF v2.1.0 specification.
- Mapped Xeol's internal
match.Match objects into standardized SARIF Rules and Results.
- Properly mapped Syft-discovered file coordinates (
Locations) so that EOL findings highlight the exact file paths in the user's IDE or PR diffs.
How to Test
- Build the binary from this branch.
- Run a scan against a local directory or image with the SARIF output flag:
xeol dir:. -o sarif > xeol-results.sarif
- Verify the
xeol-results.sarif file is generated properly.
- (Optional) Upload the generated file to a SARIF viewer (like the VS Code extension) to verify that the physical locations correctly map to the repository files.
Related Issues
(Link any related issue here, e.g., "Closes #123")
Summary
This PR introduces support for the SARIF (Static Analysis Results Interchange Format) output format.
By adding the
--output sarifflag (orsarifto the.xeol.yamlconfig), users can now seamlessly integrate Xeol's End-of-Life dependency findings directly into modern CI/CD security dashboards, such as GitHub Advanced Security (GHAS) or GitLab Security.Changes Made
sarifFormatto the internal format parsers and presenter options.sarif.Presenterutilizing thegithub.com/owenrumney/go-sariflibrary to ensure strict compliance with the SARIF v2.1.0 specification.match.Matchobjects into standardized SARIF Rules and Results.Locations) so that EOL findings highlight the exact file paths in the user's IDE or PR diffs.How to Test
xeol dir:. -o sarif > xeol-results.sarifxeol-results.sariffile is generated properly.Related Issues
(Link any related issue here, e.g., "Closes #123")