-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test trivy-vulnerability-scanner (#699)
* test trivy-vulnerability-scanner * update trivvy.yml * add tests on images build in other repo's * re-order * Update trivvy.yml, add if always to all scans * Update trivvy.yml, add other locally build container * Update trivvy.yml * Update trivvy.yml * wis2downloader not build locally * update mosquitto base-image version * rename, matrix scan, only scan images built in this repo * remove old fild * fix * revert mosquitto base-image version * fix permission error for new mosquitto base-image version * try to use a different TRIVY_DB_REPOSITORY to work around the TOOMANYREQUESTS issue * java db repo --------- Co-authored-by: Tom Kralidis <tomkralidis@gmail.com>
- Loading branch information
1 parent
1719569
commit 4079c2d
Showing
3 changed files
with
36 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: Run Trivy vulnerability scanner | ||
|
||
on: [ push ] | ||
|
||
jobs: | ||
main: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
image: ['wis2box-management', 'wis2box-mqtt-metrics-collector', 'wis2box-broker'] | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
- name: Build docker image ${{ matrix.image }} | ||
run: | | ||
docker build -t ${{ matrix.image }}:test ${{ matrix.image }} | ||
- name: Run Trivy vulnerability scanner on ${{ matrix.image }} | ||
if: always() | ||
uses: aquasecurity/trivy-action@0.20.0 | ||
env: | ||
TRIVY_DB_REPOSITORY: public.ecr.aws/aquasecurity/trivy-db:2 | ||
TRIVY_JAVA_DB_REPOSITORY: public.ecr.aws/aquasecurity/trivy-java-db:1 | ||
with: | ||
image-ref: ${{ matrix.image }}:test | ||
format: 'table' | ||
exit-code: '1' | ||
ignore-unfixed: true | ||
vuln-type: 'os,library' | ||
severity: 'CRITICAL,HIGH' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters