Skip to content

Commit

Permalink
Merge pull request #4049 from cisagov/feature/add-trivy-scanner
Browse files Browse the repository at this point in the history
feature: add Trivy scanner
  • Loading branch information
randywoods authored Sep 13, 2024
2 parents 22d218f + 6a02d2a commit a3e1b72
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 69 deletions.
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/[email protected]
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/[email protected]
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

0 comments on commit a3e1b72

Please sign in to comment.