Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Trivy image scanner #1912

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading