Skip to content

Commit

Permalink
Add trivy scan as a job in release workflow
Browse files Browse the repository at this point in the history
Signed-off-by: ArkaSaha30 <[email protected]>
  • Loading branch information
ArkaSaha30 committed Apr 2, 2024
1 parent caa523f commit 4e639e7
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 32 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,41 @@ jobs:
- name: test-image
run: |
VERSION=3.6.99 ./scripts/test_images.sh
- name: save-image
run: |
docker image save -o /tmp/etcd-img.tar gcr.io/etcd-development/etcd
- name: upload-image
uses: actions/upload-artifact@v3
with:
name: etcd-img
path: /tmp/etcd-img.tar
retention-days: 1
trivy-scan:
needs: main
strategy:
fail-fast: false
matrix:
platforms: [amd64, arm64, ppc64le, s390x]
permissions:
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
runs-on: ubuntu-latest
steps:
- name: get-image
uses: actions/download-artifact@v3
with:
name: etcd-img
path: /tmp
- name: load-image
run: |
docker load < /tmp/etcd-img.tar
- name: trivy-scan
uses: aquasecurity/trivy-action@d710430a6722f083d3b36b8339ff66b32f22ee55 # v0.19.0
with:
image-ref: 'gcr.io/etcd-development/etcd:v3.6.99-${{ matrix.platforms }}'
severity: 'CRITICAL,HIGH'
format: 'sarif'
output: 'trivy-results-${{ matrix.platforms }}.sarif'
- name: upload scan results
uses: github/codeql-action/upload-sarif@956f09c2ef1926b580554b9014cfb8a51abf89dd # v2.16.6
with:
sarif_file: 'trivy-results-${{ matrix.platforms }}.sarif'
32 changes: 0 additions & 32 deletions .github/workflows/trivy-scan-nightly.yaml

This file was deleted.

0 comments on commit 4e639e7

Please sign in to comment.