diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2b7a99d..777cd25 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -14,7 +14,7 @@ jobs: permissions: contents: read id-token: write - + security-events: write steps: - uses: actions/checkout@v3 @@ -33,10 +33,38 @@ jobs: service_account: "gh-actions-dapla-pseudo@artifact-registry-5n.iam.gserviceaccount.com" token_format: access_token + - name: Build with Maven + run: mvn --batch-mode -P ssb-gar package + + - name: Fail build on High/Critical Vulnerabilities + uses: aquasecurity/trivy-action@master + with: + scan-type: 'fs' + format: 'table' + scan-ref: '.' + severity: 'HIGH,CRITICAL' + ignore-unfixed: true + exit-code: 1 + + - name: Run Trivy vulnerability scanner (SARIF for reporting) + uses: aquasecurity/trivy-action@master + with: + scan-type: 'fs' + ignore-unfixed: true + format: 'sarif' + output: 'trivy-results.sarif' + severity: 'CRITICAL,HIGH' + skip-setup-trivy: true + + - name: Upload Trivy scan results to GitHub Security tab + uses: github/codeql-action/upload-sarif@v4 + with: + sarif_file: 'trivy-results.sarif' + - name: Build and test with Maven if: github.event_name == 'pull_request' - run: mvn --batch-mode -P ssb-bip clean test + run: mvn --batch-mode -P ssb-gar clean test - name: Build with Maven and deploy to Artifact Registry - if: github.event_name == 'push' && github.ref == 'refs/heads/master' - run: mvn --batch-mode -P ssb-bip deploy -Dmaven.javadoc.skip=true + if: github.event_name == 'push' && github.ref == 'refs/heads/master' && success() + run: mvn --batch-mode -P ssb-gar deploy -Dmaven.javadoc.skip=true diff --git a/pom.xml b/pom.xml index 9ffe7d0..22c6082 100644 --- a/pom.xml +++ b/pom.xml @@ -17,7 +17,7 @@ 1.3.3 32.0.0-jre 1.5.1 - 1.4.6 + 1.4.12 1.18.30 4.3.7 4.4.0 @@ -27,6 +27,7 @@ 2.9.1 2.11.5 3.2.2 + 3.25.5 2.1.4 @@ -134,6 +135,12 @@ tika-core ${tika.version} + + com.google.protobuf + protobuf-java + ${protobuf.version} + + net.lingala.zip4j zip4j @@ -381,7 +388,7 @@ - ssb-bip + ssb-gar artifact-registry