Skip to content

Commit 4832c0a

Browse files
committed
feat(repo): Stop using trivy to find vulnerable packages
This tool has been used to steal information that could assist threat actors to gain unauthorised access to our code repositories and build machines.
1 parent 9b58221 commit 4832c0a

1 file changed

Lines changed: 5 additions & 14 deletions

File tree

.github/workflows/production.yml

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ on:
88
schedule:
99
- cron: 00 4 * * 4
1010

11+
permissions:
12+
contents: read
13+
packages: write
14+
1115
jobs:
1216
build:
1317
runs-on: ubuntu-latest
@@ -33,20 +37,7 @@ jobs:
3337
password: ${{ secrets.GITHUB_TOKEN }}
3438

3539
- name: Build the container image
36-
run: docker build . --tag php-docker-base:trivytemp --file Dockerfile.${{ matrix.php }}
37-
38-
- name: Run Trivy vulnerability scanner
39-
uses: aquasecurity/trivy-action@master
40-
with:
41-
image-ref: php-docker-base:trivytemp
42-
format: 'table'
43-
exit-code: '1'
44-
ignore-unfixed: true
45-
vuln-type: 'os,library'
46-
severity: 'CRITICAL,HIGH'
47-
48-
- name: Retag new image with latest tag so we can push the scanned version
49-
run: docker image tag php-docker-base:trivytemp "ghcr.io/$(echo '${{ github.repository }}' | tr '[:upper:]' '[:lower:]'):${{ matrix.php }}"
40+
run: docker build . --tag "ghcr.io/$(echo '${{ github.repository }}' | tr '[:upper:]' '[:lower:]'):${{ matrix.php }}" --file Dockerfile.${{ matrix.php }}
5041

5142
- name: Push with commit ${{ matrix.php }} tag
5243
run: docker push "ghcr.io/$(echo '${{ github.repository }}' | tr '[:upper:]' '[:lower:]'):${{ matrix.php }}"

0 commit comments

Comments
 (0)