-
Notifications
You must be signed in to change notification settings - Fork 0
69 lines (63 loc) · 1.78 KB
/
security.yml
File metadata and controls
69 lines (63 loc) · 1.78 KB
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
name: Security
on:
push:
branches: [main]
pull_request:
branches: [main]
schedule:
- cron: '0 7 * * 1' # Mondays 07:00 UTC
permissions:
contents: read
security-events: write
jobs:
gosec:
name: gosec
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with: { go-version: '1.23', cache: true }
- name: Run gosec
uses: securego/gosec@master
with:
args: '-no-fail -fmt sarif -out gosec.sarif ./...'
- name: Upload SARIF
uses: github/codeql-action/upload-sarif@v3
if: always()
with:
sarif_file: gosec.sarif
category: gosec
govulncheck:
name: govulncheck
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with: { go-version: '1.23', cache: true }
- name: Install govulncheck
run: go install golang.org/x/vuln/cmd/govulncheck@latest
- name: Run govulncheck (informational; stdlib vulns not blocking)
continue-on-error: true
run: govulncheck ./...
trivy:
name: Trivy filesystem scan
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Trivy scan
uses: aquasecurity/trivy-action@master
with:
scan-type: fs
scan-ref: .
format: sarif
output: trivy.sarif
severity: CRITICAL,HIGH,MEDIUM
ignore-unfixed: true
- name: Upload SARIF
uses: github/codeql-action/upload-sarif@v3
if: always()
with:
sarif_file: trivy.sarif
category: trivy
# CodeQL is handled by GitHub's default Code Scanning setup on this repo.
# An advanced (workflow-defined) CodeQL job would conflict, so we leave it out.