Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit a507f33

Browse files
authored
Adding Trivy to scan source code (#12)
1 parent 9961ce9 commit a507f33

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

.github/workflows/security.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Security
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
types: [opened, synchronize, reopened]
9+
10+
jobs:
11+
build:
12+
name: Trivy code scanning
13+
runs-on: ubuntu-18.04
14+
steps:
15+
- name: Checkout code
16+
uses: actions/checkout@v2
17+
18+
- name: Run Trivy vulnerability scanner in repo mode
19+
uses: aquasecurity/trivy-action@master
20+
with:
21+
scan-type: 'fs'
22+
ignore-unfixed: true
23+
format: 'template'
24+
template: '@/contrib/sarif.tpl'
25+
output: 'trivy-results.sarif'
26+
severity: 'CRITICAL,HIGH'
27+
28+
- name: Upload Trivy scan results to GitHub Security tab
29+
uses: github/codeql-action/upload-sarif@v1
30+
with:
31+
sarif_file: 'trivy-results.sarif'

0 commit comments

Comments
 (0)