Fix: Trivy manuell via curl installieren statt trivy-action/setup-trivy

setup-trivy's Install-Step macht immer einen git clone von
aquasecurity/trivy gegen github.com, unabhängig vom Cache-Status. Das
scheitert im Gitea act_runner mit "could not read Username for
'https://github.com'", da der Git-Smart-HTTP-Handshake blockiert wird.
Plain curl-Downloads von GitHub-Release-Assets funktionieren dagegen
(siehe OSV-Scanner-Step), daher wird Trivy jetzt genauso installiert.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Kh9v73QApBwJj96w6A8R55
This commit is contained in:
2026-09-10 19:28:40 +02:00
co-authored by Claude Sonnet 5
parent eac398a73e
commit 186251e21a
+19 -9
View File
@@ -19,16 +19,26 @@ jobs:
- name: Checkout Repository
uses: actions/checkout@v7
- name: Install Trivy
env:
TRIVY_VERSION: "0.70.0"
run: |
curl -fsSL -o trivy.tar.gz \
"https://github.com/aquasecurity/trivy/releases/download/v${TRIVY_VERSION}/trivy_${TRIVY_VERSION}_Linux-64bit.tar.gz"
tar -xzf trivy.tar.gz trivy
chmod +x trivy
sudo mv trivy /usr/local/bin/trivy
rm -f trivy.tar.gz
- name: Run Trivy Scanner
uses: aquasecurity/trivy-action@v0.36.0
with:
scan-type: fs
scan-ref: .
scanners: vuln,secret,misconfig
severity: CRITICAL,HIGH
format: json
output: trivy-results.json
exit-code: "0"
run: |
trivy fs \
--scanners vuln,secret,misconfig \
--severity CRITICAL,HIGH \
--format json \
--output trivy-results.json \
--exit-code 0 \
.
- name: Install OSV-Scanner
run: |