Skip to content

Commit 01c1b77

Browse files
committed
ci: add trivy security scan
1 parent e894318 commit 01c1b77

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

.github/workflows/trivy.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
#
2+
# SPDX-License-Identifier: Apache-2.0
3+
# Copyright (c) StreamThoughts
4+
#
5+
# Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0
6+
#
7+
name: Run Trivy Vulnerability
8+
on:
9+
push:
10+
branches:
11+
- master
12+
pull_request:
13+
jobs:
14+
build:
15+
name: Build
16+
runs-on: ubuntu-20.04
17+
steps:
18+
- name: Checkout code
19+
uses: actions/checkout@v3
20+
21+
- name: Run Trivy vulnerability scanner in repo mode
22+
uses: aquasecurity/trivy-action@master
23+
with:
24+
scan-type: 'fs'
25+
ignore-unfixed: true
26+
format: 'sarif'
27+
output: 'trivy-results.sarif'
28+
severity: 'CRITICAL'
29+
30+
- name: Upload Trivy scan results to GitHub Security tab
31+
uses: github/codeql-action/upload-sarif@v2
32+
with:
33+
sarif_file: 'trivy-results.sarif'

0 commit comments

Comments
 (0)