Skip to content

Commit

Permalink
fix(ci): allow trivy to fail (temporary)
Browse files Browse the repository at this point in the history
  • Loading branch information
DerekRoberts committed Nov 11, 2024
1 parent 90c9e18 commit 1439fdc
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 67 deletions.
62 changes: 58 additions & 4 deletions .github/workflows/analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,67 @@ jobs:
if: github.event_name != 'pull_request' || !github.event.pull_request.draft
uses: ./.github/workflows/reusable-tests-fe.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"

codeql:
name: Semantic Code Analysis
runs-on: ubuntu-24.04
permissions:
actions: read
contents: read
security-events: write
steps:
- uses: actions/checkout@v4
- uses: github/codeql-action/init@v3
with:
languages: javascript,java

# Autobuild failed for Java, so building manually
- name: Set up JDK 17 and Caching maven dependencies
uses: actions/setup-java@v4
with:
distribution: "temurin"
java-version: "17"
cache: "maven"

# Java builds
- name: Build Backend
working-directory: backend
run: ./mvnw clean package -DskipTests -Dtests.skip=true -Dskip.unit.tests=true

- name: Build Legacy
working-directory: legacy
run: ./mvnw clean package -DskipTests -Dtests.skip=true -Dskip.unit.tests=true

- name: Build Processor
working-directory: processor
run: ./mvnw clean package -DskipTests -Dtests.skip=true -Dskip.unit.tests=true

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3

results:
name: Analysis Results
needs: [tests-java, tests-frontend, repo-reports]
needs: [tests-java, tests-frontend, codeql] # Restore trivy when/if fixed
runs-on: ubuntu-24.04
steps:
- run: echo "Workflow completed successfully!"
63 changes: 0 additions & 63 deletions .github/workflows/reusable-tests-repo.yml

This file was deleted.

0 comments on commit 1439fdc

Please sign in to comment.