Skip to content

Commit

Permalink
Merge pull request #1912 from torredil/fix-image-scanner-7821
Browse files Browse the repository at this point in the history
Fix Trivy image scanner
  • Loading branch information
k8s-ci-robot authored Jan 29, 2024
2 parents 6895f24 + 27819ad commit b14893f
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 2 deletions.
21 changes: 20 additions & 1 deletion .github/workflows/trivy-containers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,27 @@ jobs:
image: ${{ fromJson(needs.build-matrix.outputs.images) }}

steps:
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }}
role-session-name: GitHubCI
aws-region: us-east-1
role-duration-seconds: 1800
role-skip-session-tagging: true

- name: Login to Amazon ECR Public
uses: aws-actions/amazon-ecr-login@v2
with:
registry-type: public

- name: Pull container image
run: docker pull ${{ matrix.image }}

- name: Scan container image
uses: aquasecurity/trivy-action@0.12.0
uses: aquasecurity/trivy-action@0.16.1
with:
image-ref: '${{ matrix.image }}'
output: 'results.sarif'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/trivy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
uses: actions/checkout@v3

- name: Run Trivy vulnerability scanner in repo mode
uses: aquasecurity/trivy-action@0.12.0
uses: aquasecurity/trivy-action@0.16.1
with:
scan-type: 'fs'
ignore-unfixed: true
Expand Down

0 comments on commit b14893f

Please sign in to comment.