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

ci: Set fallback AWS repository for ratelimited trivy DBs #1808

Merged
merged 2 commits into from
Nov 1, 2024
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
8 changes: 4 additions & 4 deletions .github/actions/trivy-config/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,29 +17,29 @@ runs:
helm template charts/connaisseur > deployment/deployment.yaml
shell: bash
- name: Scan deployment.yaml
uses: aquasecurity/trivy-action@fbd16365eb88e12433951383f5e99bd901fc618f # v0.12.0
uses: aquasecurity/trivy-action@915b19bbe73b92a6cf82a1bc12b087c9a19a5fe2 # v0.28.0
if: inputs.output == 'table'
with:
scan-type: "config"
scan-ref: "deployment"
format: 'table'
- name: Scan Dockerfiles
uses: aquasecurity/trivy-action@fbd16365eb88e12433951383f5e99bd901fc618f # v0.12.0
uses: aquasecurity/trivy-action@915b19bbe73b92a6cf82a1bc12b087c9a19a5fe2 # v0.28.0
if: inputs.output == 'table'
with:
scan-type: "config"
scan-ref: "build"
format: 'table'
- name: Scan deployment.yaml
uses: aquasecurity/trivy-action@fbd16365eb88e12433951383f5e99bd901fc618f # v0.12.0
uses: aquasecurity/trivy-action@915b19bbe73b92a6cf82a1bc12b087c9a19a5fe2 # v0.28.0
if: inputs.output == 'sarif'
with:
scan-type: "config"
scan-ref: "deployment"
format: 'sarif'
output: 'reports/trivy-k8s-results.sarif'
- name: Scan Dockerfiles
uses: aquasecurity/trivy-action@fbd16365eb88e12433951383f5e99bd901fc618f # v0.12.0
uses: aquasecurity/trivy-action@915b19bbe73b92a6cf82a1bc12b087c9a19a5fe2 # v0.28.0
if: inputs.output == 'sarif'
with:
scan-type: "config"
Expand Down
10 changes: 8 additions & 2 deletions .github/actions/trivy-image/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,20 +33,26 @@ runs:
shell: sh
- name: Run Trivy on image
if: inputs.output == 'sarif'
uses: aquasecurity/trivy-action@fbd16365eb88e12433951383f5e99bd901fc618f # v0.12.0
uses: aquasecurity/trivy-action@915b19bbe73b92a6cf82a1bc12b087c9a19a5fe2 # v0.28.0
with:
image-ref: ${{ inputs.image }}
scan-type: "image"
format: 'sarif'
output: 'reports/trivy-vuln-results.sarif'
env:
TRIVY_DB_REPOSITORY: ghcr.io/aquasecurity/trivy-db,public.ecr.aws/aquasecurity/trivy-db # Workaround for https://github.com/aquasecurity/trivy-action/issues/389
TRIVY_JAVA_DB_REPOSITORY: ghcr.io/aquasecurity/trivy-java-db,public.ecr.aws/aquasecurity/trivy-java-db # Workaround for https://github.com/aquasecurity/trivy-action/issues/389
- name: Run Trivy on image
if: inputs.output == 'table'
uses: aquasecurity/trivy-action@fbd16365eb88e12433951383f5e99bd901fc618f # v0.12.0
uses: aquasecurity/trivy-action@915b19bbe73b92a6cf82a1bc12b087c9a19a5fe2 # v0.28.0
with:
image-ref: ${{ inputs.image }}
scan-type: "image"
exit-code: 1
format: 'table'
env:
TRIVY_DB_REPOSITORY: ghcr.io/aquasecurity/trivy-db,public.ecr.aws/aquasecurity/trivy-db # Workaround for https://github.com/aquasecurity/trivy-action/issues/389
TRIVY_JAVA_DB_REPOSITORY: ghcr.io/aquasecurity/trivy-java-db,public.ecr.aws/aquasecurity/trivy-java-db # Workaround for https://github.com/aquasecurity/trivy-action/issues/389
- name: Upload
if: inputs.output == 'sarif'
uses: github/codeql-action/upload-sarif@32dc499307d133bb5085bae78498c0ac2cf762d5 # v2.2.5
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/.reusable-sca.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,6 @@ jobs:
permissions:
packages: read
security-events: write
container:
image: docker:stable
steps:
- name: Checkout code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
Expand Down
Loading