-
Notifications
You must be signed in to change notification settings - Fork 2
48 lines (45 loc) · 1.39 KB
/
sec-codeql.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
46
47
48
name: Security - CodeQL
on:
push:
branches: [ main ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ main ]
schedule:
- cron: '11 0 * * 5'
workflow_dispatch:
permissions:
contents: read
jobs:
analyze:
name: Analyze Code
permissions:
security-events: write
actions: read
contents: read
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4
with:
go-version-file: go.mod
cache: false
- name: Setup Golang Caches
uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@5b62e7a9f186342c830e01bc69a4626fd1573b6e # v2
with:
languages: go
# Autobuild attempts to build any compiled languages.
- name: Autobuild
uses: github/codeql-action/autobuild@5b62e7a9f186342c830e01bc69a4626fd1573b6e # v2
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@5b62e7a9f186342c830e01bc69a4626fd1573b6e # v2