Skip to content

Commit

Permalink
Update main.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
stevensrtw authored Sep 23, 2024
1 parent ca0a0f3 commit 971d838
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,21 @@ jobs:
echo "Exploded $jarfile into $exploded_dir"
done
- name: Scan a specific path with Trivy
uses: aquasecurity/trivy-action@master
with:
scan-type: 'fs'
path: '/home/runner/work/OHDSI-ArachneCommons/OHDSI-ArachneCommons/target' # Replace with the actual path you want to scan
severity: 'CRITICAL,HIGH'
scan-type: 'fs' # Filesystem scan
path: '/home/runner/work/OHDSI-ArachneCommons/OHDSI-ArachneCommons/target'
format: 'json' # Output in JSON format
output: '/home/runner/work/OHDSI-ArachneCommons/OHDSI-ArachneCommons/trivy-results.json' # Save results to trivy-results.json file

- name: Covert Trivy to CSV
run: |
jq -r '.Results[] | select(.Vulnerabilities != null) | .Vulnerabilities[] | [.SeveritySource, .VulnerabilityID, .PkgName, .PkgPath, .InstalledVersion, .FixedVersion, .Status, .Severity] | @csv' /home/runner/work/OHDSI-ArachneCommons/OHDSI-ArachneCommons/trivy-results.json > OHDSI-ArachneCommons.csv
- name: Upload Reports
uses: actions/upload-artifact@v4
with:
name: trivy-reports
path: |
OHDSI-ArachneCommons.csv

0 comments on commit 971d838

Please sign in to comment.