Skip to content

feat: Add SARIF format reporting for CI/CD integration - #600

Open
hellonico wants to merge 1 commit into
xeol-io:mainfrom
hellonico:feature/sarif-reporting
Open

feat: Add SARIF format reporting for CI/CD integration#600
hellonico wants to merge 1 commit into
xeol-io:mainfrom
hellonico:feature/sarif-reporting

Conversation

@hellonico

Copy link
Copy Markdown

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

  1. Build the binary from this branch.
  2. Run a scan against a local directory or image with the SARIF output flag:
    xeol dir:. -o sarif > xeol-results.sarif
  3. Verify the xeol-results.sarif file is generated properly.

Closes #599

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add SARIF format reporting for CI/CD integration

1 participant