Skip to content

Commit

Permalink
adds scanning to actions
Browse files Browse the repository at this point in the history
  • Loading branch information
niquerio committed Nov 6, 2023
1 parent 3332bc0 commit 2e78907
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 1 deletion.
15 changes: 15 additions & 0 deletions .github/workflows/build-deploy-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,21 @@ jobs:
tag: ${{ github.event.release.tag_name }}
dockerfile: Dockerfile
secrets: inherit

scan-image:
needs: build-production
runs-on: ubuntu-latest
steps:
- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@master
with:
image-ref: ghcr.io/mlibrary/${{ vars.IMAGE_NAME }}:${{ github.event.release.tag_name }}
format: 'table'
exit-code: '1'
ignore-unfixed: true
vuln-type: 'os,library'
severity: 'CRITICAL,HIGH'
skip-files: '/gems/ruby/3.2.0/gems/openid_connect-2.2.0/spec/mock_response/public_keys/private_key.pem'

deploy-production:
needs: build-production
Expand Down
15 changes: 15 additions & 0 deletions .github/workflows/build-main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,21 @@ jobs:
tag: ${{ github.sha }}
dockerfile: Dockerfile
secrets: inherit

scan-image:
needs: build-unstable
runs-on: ubuntu-latest
steps:
- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@master
with:
image-ref: ${{ needs.build-unstable.outputs.image }}
format: 'table'
exit-code: '1'
ignore-unfixed: true
vuln-type: 'os,library'
severity: 'CRITICAL,HIGH'
skip-files: '/gems/ruby/3.2.0/gems/openid_connect-2.2.0/spec/mock_response/public_keys/private_key.pem'

deploy-testing:
needs: build-unstable
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy-production.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
tag: ${{ github.event.inputs.tag }}
dockerfile: Dockerfile
secrets: inherit

deploy-production:
needs: build-production
runs-on: ubuntu-latest
Expand Down

0 comments on commit 2e78907

Please sign in to comment.