11
11
- main
12
12
- release-*
13
13
schedule :
14
- - cron : " 39 13 * * 6"
14
+ - cron : " 39 13 * * 6" # run every Saturday at 13:39 UTC
15
15
16
16
concurrency :
17
17
group : ${{ github.ref_name }}-codeql
@@ -22,19 +22,21 @@ permissions:
22
22
23
23
jobs :
24
24
analyze :
25
+ permissions :
26
+ actions : read # for github/codeql-action/init to get workflow details
27
+ contents : read # for actions/checkout to fetch code
28
+ security-events : write # for github/codeql-action/autobuild to send a status report
25
29
name : Analyze
26
30
runs-on : ubuntu-22.04
27
- permissions :
28
- actions : read
29
- contents : read
30
- security-events : write
31
31
32
32
strategy :
33
33
fail-fast : false
34
34
matrix :
35
35
language : ["go", "javascript"]
36
- # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
37
- # Learn more about CodeQL language support at https://git.io/codeql-language-support
36
+ # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby', 'swift' ]
37
+ # Use only 'java' to analyze code written in Java, Kotlin or both
38
+ # Use only 'javascript' to analyze code written in JavaScript, TypeScript or both
39
+ # Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
38
40
39
41
steps :
40
42
- name : Checkout repository
@@ -48,23 +50,32 @@ jobs:
48
50
# If you wish to specify custom queries, you can do so here or in a config file.
49
51
# By default, queries listed here will override any specified in a config file.
50
52
# Prefix the list here with "+" to use these queries and those in the config file.
51
- # queries: ./path/to/local/query, your-org/your-repo/queries@main
52
53
53
- # Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
54
+ # For more details on CodeQL's query packs, refer to: https://docs.github.com./en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
55
+ # queries: security-extended,security-and-quality
56
+
57
+ - name : Setup Golang Environment
58
+ uses : actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0
59
+ with :
60
+ go-version-file : go.mod
61
+ if : matrix.language == 'go'
62
+
63
+ # Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift).
54
64
# If this step fails, then you should remove it and run the build manually (see below)
55
65
- name : Autobuild
56
66
uses : github/codeql-action/autobuild@04daf014b50eaf774287bf3f0f1869d4b4c4b913 # v2.21.7
57
67
58
68
# ℹ️ Command-line programs to run using the OS shell.
59
- # 📚 https://git.io/JvXDl
69
+ # 📚 See https://docs.github.com./en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
60
70
61
- # ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
62
- # and modify them (or add more) to build your code if your project
63
- # uses a compiled language
71
+ # If the Autobuild fails above, remove it and uncomment the following three lines.
72
+ # modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
64
73
65
74
# - run: |
66
- # make bootstrap
67
- # make release
75
+ # echo "Run, Build Application using script"
76
+ # ./location_of_script_within_repo/buildscript.sh
68
77
69
78
- name : Perform CodeQL Analysis
70
79
uses : github/codeql-action/analyze@04daf014b50eaf774287bf3f0f1869d4b4c4b913 # v2.21.7
80
+ with :
81
+ category : " /language:${{matrix.language}}"
0 commit comments