-
-
Notifications
You must be signed in to change notification settings - Fork 2
48 lines (43 loc) · 1.33 KB
/
security-scan.yaml
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
39
40
41
42
43
44
45
46
47
48
name: Security Scan 👮
env:
REGISTRY: ghcr.io
on:
schedule:
- cron: '44 21 7,21 * *'
workflow_dispatch:
jobs:
build:
name: Security Scan 🚔
runs-on: ubuntu-latest
strategy:
matrix:
image:
- r: '4.4.1'
bioc: '3.19'
distro: rstudio
steps:
- name: Log in to the Container registry 🗝
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Run Trivy vulnerability scanner 🚓
uses: aquasecurity/[email protected]
with:
scan-type: image
image-ref: ${{ env.REGISTRY }}/${{ github.repository_owner }}/${{ matrix.image.distro }}_${{ matrix.image.r }}_bioc_${{ matrix.image.bioc }}:latest
exit-code: 0
ignore-unfixed: true
vuln-type: 'os,library'
severity: 'CRITICAL,HIGH,MEDIUM'
format: 'sarif'
output: 'trivy-results.sarif'
timeout: 30m0s
security-checks: vuln,secret,config
github-pat: ${{ secrets.GITHUB_TOKEN }}
- name: Upload Trivy scan results to GitHub Security tab ⛽
uses: github/codeql-action/upload-sarif@v2
if: always()
with:
sarif_file: 'trivy-results.sarif'