-
Notifications
You must be signed in to change notification settings - Fork 1
45 lines (43 loc) · 1.1 KB
/
security.yml
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
---
name: Security Checks
on:
pull_request:
branches: [main]
push:
branches: [main]
schedule:
- cron: '0 15 * * 0'
permissions:
contents: read
actions: read
pull-requests: read
security-events: write
jobs:
gosec:
name: Golang Security Checker
runs-on: ubuntu-22.04
steps:
- name: Checkout Source
uses: actions/checkout@v4
- name: Run Gosec Security Scanner
uses: securego/gosec@master
with:
args: '-no-fail -fmt sarif -out results.sarif -tests ./...'
- name: Upload SARIF file
uses: github/codeql-action/upload-sarif@v3
with:
# Path to SARIF file relative to the root of the repository
sarif_file: results.sarif
govulncheck:
name: Govulncheck
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Setup Go
uses: WillAbides/[email protected]
with:
go-version-file: go.mod
- name: Install govulncheck
run: go install golang.org/x/vuln/cmd/govulncheck@latest
- name: Run govulncheck
run: govulncheck ./...