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
name: "Security: Scan Docker images"description: "Scan Docker images for OS vulnerabilities using Trivy"inputs:
image:
description: "Docker image name"required: trueruns:
using: "composite"steps:
# Trivy scan
- name: "Run Trivy vulnerability scanner"uses: aquasecurity/[email protected]with:
image-ref: '${{ inputs.image }}'scan-type: 'image'vuln-type: 'os'# cache-dir doesn't work as argument, so we need to use trivi-config file# this implies using 'format' and 'output' in the trivi-config filetrivy-config: .github/actions/sec-scan-images/trivy.yml# Upload results
- name: "Upload Trivy scan results to GitHub Security tab"uses: github/codeql-action/upload-sarif@v3with:
sarif_file: 'trivy-results.sarif'category: 'trivy-image-${{ inputs.image }}'
I have this Github action:
Trivy file:
If I run it in a Github runner, it works. But, if I run it in my runner, I got this error:
As you can see, the file is properly read but it still tries to use the
/github/home/.cache
path instead of./trivy-cache
.I tried to use
cache-dir
as argument, but I think it is not read when using the sarif output. This would be a different issue (parsing arguments).The text was updated successfully, but these errors were encountered: