Skip to content

Commit bb09387

Browse files
Merge pull request #81 from travis-ci/ds-patch-1
Create trivy-analysis.yml
2 parents 7a28324 + d125ee9 commit bb09387

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: build
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
# The branches below must be a subset of the branches above
8+
branches: [ master ]
9+
schedule:
10+
- cron: '36 19 * * 5'
11+
12+
jobs:
13+
build:
14+
name: Build
15+
runs-on: "ubuntu-18.04"
16+
steps:
17+
- name: Checkout code
18+
uses: actions/checkout@v2
19+
20+
- name: Build an image from Dockerfile
21+
run: |
22+
docker build -t travis-ci/travis-listener:${{ github.sha }} .
23+
24+
- name: Run Trivy vulnerability scanner
25+
uses: aquasecurity/trivy-action@master
26+
with:
27+
image-ref: 'travis-ci/travis-listener:${{ github.sha }}'
28+
format: 'template'
29+
template: '@/contrib/sarif.tpl'
30+
output: 'trivy-results.sarif'
31+
severity: 'CRITICAL,HIGH'
32+
33+
- name: Upload Trivy scan results to GitHub Security tab
34+
uses: github/codeql-action/upload-sarif@v1
35+
with:
36+
sarif_file: 'trivy-results.sarif'

0 commit comments

Comments
 (0)