Add .gitea/workflows/*.yaml
This commit is contained in:
@@ -103,18 +103,14 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
name: image
|
name: image
|
||||||
path: /tmp
|
path: /tmp
|
||||||
- name: Scan saved image tar with Trivy via Docker
|
- name: Load image
|
||||||
|
run: docker load --input /tmp/image.tar
|
||||||
|
- name: Scan loaded image
|
||||||
run: |
|
run: |
|
||||||
pwd
|
IMAGE="${{ inputs.image-name }}:${{ inputs.image-tag }}"
|
||||||
ls -la /tmp || true
|
docker run --rm aquasec/trivy:0.52.2 image \
|
||||||
docker run --rm \
|
--format json --severity CRITICAL,HIGH --ignore-unfixed \
|
||||||
-v /tmp:/tmp \
|
"$IMAGE" > /tmp/trivy-results.json
|
||||||
aquasec/trivy:0.52.2 image \
|
|
||||||
--input /tmp/image.tar \
|
|
||||||
--format json \
|
|
||||||
--output /tmp/trivy-results.json \
|
|
||||||
--severity CRITICAL,HIGH \
|
|
||||||
--ignore-unfixed
|
|
||||||
- name: Upload results
|
- name: Upload results
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
|
|||||||
Reference in New Issue
Block a user