blob: ce25513399d3441368788088c74fb40fceb5fde4 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
name: Trivy
on:
workflow_dispatch:
push:
branches: [ master ]
pull_request:
branches: [ master ]
schedule:
- cron: '28 15 * * 3'
permissions:
contents: read
jobs:
build:
permissions:
contents: read
security-events: write
runs-on: "ubuntu-18.04"
steps:
- uses: actions/checkout@v2
- run: |
docker build -t docker.io/my-organization/my-app:${{ github.sha }} .
- uses: aquasecurity/trivy-action@2a2157eb22c08c9a1fac99263430307b8d1bc7a2
with:
image-ref: 'docker.io/my-organization/my-app:${{ github.sha }}'
format: 'template'
template: '@/contrib/sarif.tpl'
output: 'trivy-results.sarif'
severity: 'CRITICAL,HIGH'
ignore-unfixed: true
- uses: github/codeql-action/upload-sarif@v1
with:
sarif_file: 'trivy-results.sarif'
|