Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(ci): switch to GH CodeQL, allow Trivy to fail (temp) #438

Merged
merged 2 commits into from
Oct 31, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 10 additions & 28 deletions .github/workflows/analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,34 +74,6 @@ jobs:
# Only use triggers for PRs
triggers: ${{ github.event_name == 'pull_request' && '("frontend/")' || '' }}

codeql:
name: CodeQL
if: github.event_name != 'pull_request' || !github.event.pull_request.draft
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- uses: github/codeql-action/init@v3
- uses: actions/setup-java@v4
with:
distribution: "oracle"
java-version: "21"

- uses: actions/cache@v4
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-

- run: |
# Exclude file and build
rm InstallCert.java
./mvnw package -DskipTests
ls -la
working-directory: backend

- uses: github/codeql-action/analyze@v3

# https://github.com/marketplace/actions/aqua-security-trivy
trivy:
name: Trivy Security Scan
Expand All @@ -124,3 +96,13 @@ jobs:
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: "trivy-results.sarif"


results:
name: Analysis Results
if: always() && (!failure()) && (!cancelled())
# needs: [lint-frontend, tests-backend, tests-frontend, trivy] # Use when/if Trivy becomes more reliable again
needs: [lint-frontend, tests-backend, tests-frontend]
runs-on: ubuntu-24.04
steps:
- run: echo "Workflow completed successfully!"
Loading