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

add trivy workflow to scan repo as IaC #251

Merged
merged 3 commits into from
Jun 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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
24 changes: 24 additions & 0 deletions .github/workflows/trivy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Trivy
on:
push:
branches:
- development
pull_request:
jobs:
build:
name: Build
runs-on: ubuntu-20.04
steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Run Trivy vulnerability scanner in IaC mode
uses: aquasecurity/trivy-action@master
with:
scan-type: 'config'
trivy-config: '.trivy-config.yaml'

- name: Upload Trivy scan results to GitHub Security tab
uses: github/codeql-action/upload-sarif@v2
with:
sarif_file: 'trivy-results.sarif'
25 changes: 25 additions & 0 deletions .trivy-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
timeout: 10m
format: sarif
dependency-tree: true
list-all-pkgs: true
exit-code: 0
output: 'trivy-results.sarif'
ignore-unfixed: true
severity:
- HIGH
- CRITICAL
scan:
security-checks:
scanners:
- vuln
- misconfig
- secret
- license

vulnerability:
type:
- os
- library
ignore-unfixed: true
db:
skip-update: false
Loading