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

feature: add Trivy scanner #4049

Merged
merged 15 commits into from
Sep 13, 2024
69 changes: 0 additions & 69 deletions .github/workflows/codeql-analysis.yml

This file was deleted.

50 changes: 50 additions & 0 deletions .github/workflows/trivy-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Trivy Scanner
on:
push:
branches:
- develop
pull_request:
jobs:
dotnet:
name: .NET Analysis
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Run vulnerability scanner
uses: aquasecurity/trivy-action@0.24.0
with:
format: "sarif"
output: "trivy-dotnet-results.sarif"
scan-type: "fs"
scan-ref: "./CSETWebApi"
severity: "CRITICAL,HIGH"

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

nodejs:
name: Node.js Analysis
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Run vulnerability scanner
uses: aquasecurity/trivy-action@0.24.0
with:
format: "sarif"
output: "trivy-nodejs-results.sarif"
scan-type: "fs"
scan-ref: "./CSETWebNg"
severity: "CRITICAL,HIGH"

- name: Upload scan results to Security tab
uses: github/codeql-action/upload-sarif@v3
with:
category: "Node.js"
sarif_file: "trivy-nodejs-results.sarif"
1 change: 1 addition & 0 deletions CSETWebNg/src/app/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
import { AppModule } from './app.module';
import { environment } from '../environments/environment';


if (environment.production) {
enableProdMode();
}
Expand Down