Skip to content

Commit

Permalink
chore(ci): let Trivy fail without blocking (temporary) (#87)
Browse files Browse the repository at this point in the history
* chore(ci): let Trivy fail without blocking (temporary)

* Reusable Unit Tests and Analysis => .Tests
  • Loading branch information
DerekRoberts authored Oct 31, 2024
1 parent b5f1e0a commit 7c29b8c
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 32 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Reusable Unit Tests and Analysis
name: .Tests

on:
workflow_call:
Expand Down Expand Up @@ -28,6 +28,7 @@ jobs:
- run: |
echo "semver=${{ steps.semver.outputs.version }}"
echo "tag=${{ steps.semver.outputs.tag }}"
tests-java:
name: Library Tests
needs: [vars]
Expand Down
28 changes: 23 additions & 5 deletions .github/workflows/analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,33 @@ jobs:
tests-java:
name: Backend Tests
if: github.event_name != 'pull_request' || !github.event.pull_request.draft
uses: ./.github/workflows/reusable-tests-be.yml
uses: ./.github/workflows/.tests.yml

repo-reports:
name: Repository Reports
uses: ./.github/workflows/reusable-tests-repo.yml
trivy:
name: Repository Report
if: github.event_name != 'pull_request' || !github.event.pull_request.draft
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: Run Trivy vulnerability scanner in repo mode
uses: aquasecurity/[email protected]
with:
format: "sarif"
output: "trivy-results.sarif"
ignore-unfixed: true
scan-type: "fs"
scanners: "vuln,secret,config"
severity: "CRITICAL,HIGH"

- name: Upload Trivy scan results to GitHub Security tab
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: "trivy-results.sarif"

results:
name: Analysis Results
needs: [tests-java, repo-reports]
# needs: [tests-java, trivy] - uncomment when/if Trivy stops failing (upstream problem)
needs: [tests-java]
runs-on: ubuntu-24.04
steps:
- run: echo "Workflow completed successfully!"
26 changes: 0 additions & 26 deletions .github/workflows/reusable-tests-repo.yml

This file was deleted.

0 comments on commit 7c29b8c

Please sign in to comment.