Add .gitea/workflows/*.yaml
This commit is contained in:
@@ -103,18 +103,18 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
name: image
|
name: image
|
||||||
path: /tmp
|
path: /tmp
|
||||||
- name: Load image
|
- name: Scan saved image tar with Trivy via Docker
|
||||||
run: |
|
run: |
|
||||||
docker load --input /tmp/image.tar
|
pwd
|
||||||
docker image ls -a
|
docker run --rm \
|
||||||
- name: Run Trivy vulnerability scanner
|
-v /tmp:/tmp \
|
||||||
uses: aquasecurity/trivy-action@0.28.0
|
-v "$PWD":/work \
|
||||||
with:
|
aquasec/trivy:0.52.2 image \
|
||||||
image-ref: ${{ inputs.image-name }}:${{ inputs.image-tag }}
|
--input /tmp/image.tar \
|
||||||
format: 'json'
|
--format json \
|
||||||
output: 'trivy-results.json'
|
--output /work/trivy-results.json \
|
||||||
severity: 'CRITICAL,HIGH'
|
--severity CRITICAL,HIGH \
|
||||||
cache: 'false' # Disable built-in cache
|
--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