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
@ -82,23 +82,27 @@ jobs:
|
|||||||
# ============================================================
|
# ============================================================
|
||||||
# Vulnerability Scanning with Trivy
|
# 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
|
- name: Run Trivy vulnerability scanner
|
||||||
uses: aquasecurity/trivy-action@master
|
run: |
|
||||||
with:
|
trivy image \
|
||||||
image-ref: ${{ steps.set-tag.outputs.full_image }}
|
--exit-code 1 \
|
||||||
format: 'table'
|
--ignore-unfixed \
|
||||||
exit-code: '1'
|
--vuln-type os,library \
|
||||||
ignore-unfixed: true
|
--severity CRITICAL,HIGH \
|
||||||
vuln-type: 'os,library'
|
--format table \
|
||||||
severity: 'CRITICAL,HIGH'
|
${{ steps.set-tag.outputs.full_image }}
|
||||||
|
|
||||||
- name: Run Trivy and output SARIF
|
- name: Run Trivy and output SARIF
|
||||||
uses: aquasecurity/trivy-action@master
|
|
||||||
if: always()
|
if: always()
|
||||||
with:
|
run: |
|
||||||
image-ref: ${{ steps.set-tag.outputs.full_image }}
|
trivy image \
|
||||||
format: 'sarif'
|
--format sarif \
|
||||||
output: 'trivy-results.sarif'
|
--output trivy-results.sarif \
|
||||||
|
${{ steps.set-tag.outputs.full_image }} || true
|
||||||
|
|
||||||
# ============================================================
|
# ============================================================
|
||||||
# SBOM Generation with Syft
|
# SBOM Generation with Syft
|
||||||
|
|||||||
Reference in New Issue
Block a user