1
+ # For most projects, this workflow file will not need changing; you simply need
2
+ # to commit it to your repository.
3
+ #
4
+ # You may wish to alter this file to override the set of languages analyzed,
5
+ # or to provide custom queries or build logic.
6
+ #
7
+ # ******** NOTE ********
8
+ # We have attempted to detect the languages in your repository. Please check
9
+ # the `language` matrix defined below to confirm you have the correct set of
10
+ # supported CodeQL languages.
11
+ #
1
12
name : " CodeQL"
2
13
3
14
on :
4
15
push :
5
- branches : [master]
6
16
pull_request :
7
17
# The branches below must be a subset of the branches above
8
18
branches : [master]
9
19
schedule :
10
20
- cron : ' 0 15 * * 5'
11
21
12
- permissions :
13
- contents : read
14
-
15
22
jobs :
16
23
analyze :
17
- permissions :
18
- actions : read # for github/codeql-action/init to get workflow details
19
- contents : read # for actions/checkout to fetch code
20
- security-events : write # for github/codeql-action/autobuild to send a status report
21
24
name : Analyze
22
25
runs-on : ubuntu-latest
26
+ permissions :
27
+ actions : read
28
+ contents : read
29
+ security-events : write
23
30
24
31
strategy :
25
32
fail-fast : false
26
33
matrix :
27
- # Override automatic language detection by changing the below list
28
- # Supported options are ['csharp', 'cpp', 'go', 'java', 'javascript', 'python']
29
- language : ['go']
30
- # Learn more...
31
- # https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#overriding-automatic-language-detection
34
+ language : [ 'go' ]
32
35
33
36
steps :
34
37
- name : Harden Runner
@@ -38,23 +41,14 @@ jobs:
38
41
39
42
- name : Checkout repository
40
43
uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
41
- with :
42
- # We must fetch at least the immediate parents so that if this is
43
- # a pull request then we can checkout the head.
44
- fetch-depth : 2
45
-
46
- # If this run was triggered by a pull request event, then checkout
47
- # the head of the pull request instead of the merge commit.
48
- - run : git checkout HEAD^2
49
- if : ${{ github.event_name == 'pull_request' }}
50
44
51
45
# Initializes the CodeQL tools for scanning.
52
46
- name : Initialize CodeQL
53
47
uses : github/codeql-action/init@dd746615b3b9d728a6a37ca2045b68ca76d4841a # v3.28.8
54
48
with :
55
49
languages : ${{ matrix.language }}
56
50
# If you wish to specify custom queries, you can do so here or in a config file.
57
- # By default, queries listed here will override any specified in a config file.
51
+ # By default, queries listed here will override any specified in a config file.
58
52
# Prefix the list here with "+" to use these queries and those in the config file.
59
53
# queries: ./path/to/local/query, your-org/your-repo/queries@main
60
54
0 commit comments