Fix Trivy action compatibility with Gitea runner
Some checks failed
CI/CD Pipeline - Apartment Dashboard / Build & Push Image (push) Has been cancelled
CI/CD Pipeline - Apartment Dashboard / Deploy to Production (push) Has been cancelled
CI/CD Pipeline - Apartment Dashboard / Run Linter (push) Has been cancelled

Replace aquasecurity/trivy-action with direct Trivy installation
to avoid node24 compatibility issues with act-based runners
This commit is contained in:
2026-01-23 15:22:23 -07:00
parent 94e37f082d
commit 78c5bd1c51

View File

@ -82,23 +82,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