File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 6262 if : ${{ steps.snyk.outcome == 'success' }}
6363 with :
6464 sarif_file : snyk.sarif
65+
66+ - name : Run Trivy vulnerability scanner
67+ uses : aquasecurity/trivy-action@0.33.1
68+ id : trivy
69+ continue-on-error : true
70+ with :
71+ version : ' latest'
72+ image-ref : ' ${{ inputs.image }}'
73+ format : ' sarif'
74+ output : ' trivy-results.sarif'
75+
76+ - name : Upload Trivy scan results to GitHub Security tab
77+ uses : github/codeql-action/upload-sarif@v4
78+ if : ${{ steps.trivy.outcome == 'success' }}
79+ with :
80+ sarif_file : ' trivy-results.sarif'
81+
82+ - name : Review Security checks
83+ if : |
84+ steps.snyk.outcome != 'success' &&
85+ steps.trivy.outcome != 'success'
86+ shell : bash
87+ run : |
88+ echo "Snyk or Trivy check failed"
89+ exit 1
Original file line number Diff line number Diff line change 3939 testbuild :
4040 # Start by building images for testing. We want to run security checks before pushing those to production.
4141 name : PostgreSQL ${{ inputs.postgresql_version }}
42- runs-on : ubuntu-24.04
42+ runs-on : ubuntu-latest-16-cores
4343 permissions :
4444 contents : read
4545 packages : write
@@ -130,7 +130,7 @@ jobs:
130130
131131 security :
132132 name : Security checks
133- runs-on : ubuntu-latest
133+ runs-on : ubuntu-latest-4-cores
134134 permissions :
135135 contents : read
136136 packages : read
@@ -145,7 +145,7 @@ jobs:
145145 uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
146146
147147 - name : Security checks
148- uses : cloudnative-pg/postgres-containers/ .github/actions/security-scans@main
148+ uses : ./ .github/actions/security-scans/
149149 with :
150150 image : " ${{ matrix.image }}"
151151 registry_user : ${{ github.actor }}
You can’t perform that action at this time.
0 commit comments