Skip to content

resolve pre-decision status filter not returning projects (#711) #143

resolve pre-decision status filter not returning projects (#711)

resolve pre-decision status filter not returning projects (#711) #143

Workflow file for this run

name: Scan Docker image
on:
push:
branches: [main]
jobs:
scan:
runs-on: ubuntu-latest
strategy:
matrix:
stage: [
"final",
"initcontainer"
]
outputs:
image: ${{ steps.build.outputs.imageid }}
steps:
- name: Checkout code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@b5ca514318bd6ebac0fb2aedd5d36ec1b5c232a2 # v3
- name: Build docker image
uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6
id: build
with:
secrets: github_token=${{ secrets.GITHUB_TOKEN }}
load: true
cache-from: type=gha
cache-to: type=gha
target: ${{ matrix.stage }}
push: false
- name: Export docker image as tar
run: docker save -o ${{ matrix.stage }}-${{ github.ref_name }}.tar ${{ steps.build.outputs.imageid }}
- name: Scan Docker image for CVEs
uses: aquasecurity/trivy-action@6c175e9c4083a92bbca2f9724c8a5e33bc2d97a5 # 0.30.0
with:
input: ${{ matrix.stage }}-${{ github.ref_name }}.tar
format: 'sarif'
output: 'trivy-results.sarif'
limit-severities-for-sarif: true
ignore-unfixed: true
severity: 'CRITICAL,HIGH'
github-pat: ${{ secrets.GITHUB_TOKEN }}
- name: Upload scan results to GitHub Security
uses: github/codeql-action/upload-sarif@45775bd8235c68ba998cffa5171334d58593da47 # v3
if: always()
with:
sarif_file: 'trivy-results.sarif'