Skip to content

Commit a576e5c

Browse files
Corneil du Plessisonobc
Corneil du Plessis
authored andcommitted
Provide for disabling security scan in ci-pr.yml and adding alternative repo
Added env to control the scan. Added env to identify alternate repo.
1 parent bfa3c51 commit a576e5c

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

.github/workflows/ci.yml

+4-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55
inputs:
66
enableSecurityScan:
77
type: boolean
8-
default: false
8+
default: true
99
description: 'Enable security scan with Trivy'
1010
push:
1111
branches:
@@ -16,6 +16,8 @@ on:
1616
env:
1717
ARTIFACTORY_USERNAME: ${{ secrets.ARTIFACTORY_USERNAME }}
1818
ARTIFACTORY_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }}
19+
TRIVY_DB_REPOSITORY: public.ecr.aws/aquasecurity/trivy-db,aquasec/trivy-db,ghcr.io/aquasecurity/trivy-db
20+
TRIVY_JAVA_DB_REPOSITORY: public.ecr.aws/aquasecurity/trivy-java-db,aquasec/trivy-java-db,ghcr.io/aquasecurity/trivy-java-db
1921

2022
jobs:
2123
build:
@@ -177,7 +179,7 @@ jobs:
177179
secrets: inherit
178180
scan:
179181
runs-on: ubuntu-latest
180-
if: ${{ inputs.enableSecurityScan != null && inputs.enableSecurityScan }}
182+
if: ${{ inputs.enableSecurityScan == null || inputs.enableSecurityScan }}
181183
steps:
182184
- uses: actions/checkout@v4
183185
- name: Run Trivy vulnerability scanner in repo mode

0 commit comments

Comments
 (0)