Fix Trivy action compatibility with Gitea runner
Replace aquasecurity/trivy-action with direct Trivy installation to avoid node24 compatibility issues with act-based runners
This commit is contained in:
30
.github/workflows/deploy.yml
vendored
30
.github/workflows/deploy.yml
vendored
@ -97,23 +97,27 @@ jobs:
|
||||
# ============================================================
|
||||
# Vulnerability Scanning with Trivy
|
||||
# ============================================================
|
||||
- name: Install Trivy
|
||||
run: |
|
||||
curl -sfL https://raw.githubusercontent.com/aquasecurity/trivy/main/contrib/install.sh | sh -s -- -b /usr/local/bin v0.58.0
|
||||
|
||||
- name: Run Trivy vulnerability scanner
|
||||
uses: aquasecurity/trivy-action@master
|
||||
with:
|
||||
image-ref: ${{ steps.set-tag.outputs.full_image }}
|
||||
format: 'table'
|
||||
exit-code: '1'
|
||||
ignore-unfixed: true
|
||||
vuln-type: 'os,library'
|
||||
severity: 'CRITICAL,HIGH'
|
||||
run: |
|
||||
trivy image \
|
||||
--exit-code 1 \
|
||||
--ignore-unfixed \
|
||||
--vuln-type os,library \
|
||||
--severity CRITICAL,HIGH \
|
||||
--format table \
|
||||
${{ steps.set-tag.outputs.full_image }}
|
||||
|
||||
- name: Run Trivy and output SARIF
|
||||
uses: aquasecurity/trivy-action@master
|
||||
if: always()
|
||||
with:
|
||||
image-ref: ${{ steps.set-tag.outputs.full_image }}
|
||||
format: 'sarif'
|
||||
output: 'trivy-results.sarif'
|
||||
run: |
|
||||
trivy image \
|
||||
--format sarif \
|
||||
--output trivy-results.sarif \
|
||||
${{ steps.set-tag.outputs.full_image }} || true
|
||||
|
||||
# ============================================================
|
||||
# SBOM Generation with Syft
|
||||
|
||||
Reference in New Issue
Block a user