Skip to content

Commit 60b21f7

Browse files
ci: scan the distribution tree for known vulnerabilities (#851)
Adds a Trivy scan of the built app tree, using the reusable workflow. It runs on pushes and pull requests and, more importantly, weekly: most findings appear when a CVE is published against code that was released long ago, with no repository activity to trigger CI. The scan fails on HIGH and CRITICAL findings that have a fix available. It scans the unpacked distribution tree with `trivy rootfs` rather than the checkout with `trivy fs`, because the fs scanner does not run Trivy's gobinary analyzer and dependencies only exist after the build. Signed-off-by: Thomas Müller <[email protected]>
1 parent 200eef9 commit 60b21f7

1 file changed

Lines changed: 28 additions & 0 deletions

File tree

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Security Scan
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
types:
9+
- opened
10+
- synchronize
11+
- reopened
12+
schedule:
13+
# Weekly, so CVEs published against already-released code surface without a
14+
# code change. That is how the outdated bundled rclone would have been found.
15+
- cron: '0 3 * * 1'
16+
workflow_dispatch:
17+
18+
permissions:
19+
contents: read
20+
21+
concurrency:
22+
group: security-scan-${{ github.ref }}
23+
cancel-in-progress: true
24+
25+
jobs:
26+
trivy:
27+
name: Trivy
28+
uses: owncloud/reusable-workflows/.github/workflows/trivy.yml@main

0 commit comments

Comments
 (0)