Skip to content

[CRAVEX] SCA Integrations: Trivy #5

[CRAVEX] SCA Integrations: Trivy

[CRAVEX] SCA Integrations: Trivy #5

name: Generate SBOM with Trivy
on:
workflow_dispatch:
pull_request:
push:
branches:
- main
permissions:
contents: read
env:
IMAGE_REFERENCE: 'python:3.13.0-slim'
jobs:
generate-sbom:
runs-on: ubuntu-latest
steps:
- name: Run Trivy in CycloneDX SBOM mode
uses: aquasecurity/[email protected]
with:
scan-type: 'image'
image-ref: ${{ env.IMAGE_REFERENCE }}
format: 'cyclonedx'
output: 'trivy-report.sbom.json'
scanners: 'vuln,license'
version: 'latest'
- name: Upload Trivy report as a Github artifact
uses: actions/upload-artifact@v4
with:
name: upload-trivy-sbom-report
path: '${{ github.workspace }}/trivy-report.sbom.json'
retention-days: 20 # 90 is the default