mirror of
https://github.com/Dvorinka/Primora.git
synced 2026-10-28 07:41:23 +00:00
ci: run Trivy via container image, not the action
The trivy-action setup step downloads its binary through the unauthenticated GitHub API and dies to rate limits on shared runners. Running aquasec/trivy against the docker socket has no API dependency and is one line shorter. Authored By: TDvorak <[email protected]> Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
1 parent
fe28902c4a
commit
fc79c57f7e
1 file changed
+9
-7
@@ -130,14 +130,16 @@ jobs:
|
|||||||
frontend) docker run --rm --entrypoint sh primora-frontend:test -c 'test -f /usr/share/nginx/html/index.html' ;;
|
frontend) docker run --rm --entrypoint sh primora-frontend:test -c 'test -f /usr/share/nginx/html/index.html' ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
# Trivy via its container image — the action's binary installer is
|
||||||
|
# rate-limited by unauthenticated GitHub API calls on shared runners.
|
||||||
- name: Scan ${{ matrix.app }} image
|
- name: Scan ${{ matrix.app }} image
|
||||||
uses: aquasecurity/[email protected]
|
run: >-
|
||||||
with:
|
docker run --rm
|
||||||
image-ref: primora-${{ matrix.app }}:test
|
-v /var/run/docker.sock:/var/run/docker.sock
|
||||||
severity: CRITICAL,HIGH
|
aquasec/trivy:0.65.0
|
||||||
ignore-unfixed: true
|
image --severity HIGH,CRITICAL --ignore-unfixed --exit-code 0
|
||||||
exit-code: '0'
|
--format table
|
||||||
format: table
|
primora-${{ matrix.app }}:test
|
||||||
|
|
||||||
docker-publish:
|
docker-publish:
|
||||||
name: Publish edge images
|
name: Publish edge images
|
||||||
|
|||||||
Reference in new issue
Block a user