From 681267fcb6e85f373480c7e31dc37a888a86976f Mon Sep 17 00:00:00 2001 From: Andreas Schmitz Date: Wed, 13 Dec 2023 10:42:34 +0100 Subject: [PATCH] Add trivy scan --- .github/workflows/trivy.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 .github/workflows/trivy.yml diff --git a/.github/workflows/trivy.yml b/.github/workflows/trivy.yml new file mode 100644 index 0000000..0ded416 --- /dev/null +++ b/.github/workflows/trivy.yml @@ -0,0 +1,23 @@ +name: build +on: + push: + branches: + - master +jobs: + build: + name: Build + runs-on: ubuntu-20.04 + steps: + - name: Checkout code + uses: actions/checkout@v2 + - name: Build image + run: docker build -t geoserver-docker.osgeo.org/geoserver:${{ github.sha }} . + - name: Run trivy + uses: aquasecurity/trivy-action@master + with: + image-ref: 'geoserver-docker.osgeo.org/geoserver:${{ github.sha }}' + format: 'table' + exit-code: '1' + ignore-unfixed: true + vuln-type: 'os,library' + severity: 'CRITICAL,HIGH'