You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# required to fetch internal or private CodeQL packs
37
+
packages: read
38
+
39
+
# only required for workflows in private repositories
28
40
actions: read
29
41
contents: read
30
-
security-events: write
31
42
32
43
strategy:
33
44
fail-fast: false
34
45
matrix:
35
-
language: ["go"]
36
-
46
+
include:
47
+
- language: c-cpp
48
+
build-mode: autobuild
49
+
- language: go
50
+
build-mode: autobuild
51
+
# CodeQL supports the following values keywords for 'language': 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift'
52
+
# Use `c-cpp` to analyze code written in C, C++ or both
53
+
# Use 'java-kotlin' to analyze code written in Java, Kotlin or both
54
+
# Use 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both
55
+
# To learn more about changing the languages that are analyzed or customizing the build mode for your analysis,
56
+
# see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning.
57
+
# If you are analyzing a compiled language, you can modify the 'build-mode' for that language to customize how
58
+
# your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages
37
59
steps:
38
-
- name: Checkout repository
39
-
uses: actions/checkout@v4
40
-
41
-
# Initializes the CodeQL tools for scanning.
42
-
- name: Initialize CodeQL
43
-
uses: github/codeql-action/init@v3
44
-
with:
45
-
languages: ${{ matrix.language }}
46
-
# If you wish to specify custom queries, you can do so here or in a config file.
47
-
# By default, queries listed here will override any specified in a config file.
48
-
# Prefix the list here with "+" to use these queries and those in the config file.
49
-
50
-
# 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
51
-
# queries: security-extended,security-and-quality
52
-
53
-
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, or Java).
54
-
# If this step fails, then you should remove it and run the build manually (see below)
55
-
- name: Autobuild
56
-
uses: github/codeql-action/autobuild@v3
60
+
- name: Checkout repository
61
+
uses: actions/checkout@v4
57
62
58
-
# ℹ️ Command-line programs to run using the OS shell.
59
-
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
63
+
# Initializes the CodeQL tools for scanning.
64
+
- name: Initialize CodeQL
65
+
uses: github/codeql-action/init@v3
66
+
with:
67
+
languages: ${{ matrix.language }}
68
+
build-mode: ${{ matrix.build-mode }}
69
+
# If you wish to specify custom queries, you can do so here or in a config file.
70
+
# By default, queries listed here will override any specified in a config file.
71
+
# Prefix the list here with "+" to use these queries and those in the config file.
60
72
61
-
# If the Autobuild fails above, remove it and uncomment the following three lines.
62
-
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
73
+
# 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
74
+
# queries: security-extended,security-and-quality
63
75
64
-
# - run: |
65
-
# echo "Run, Build Application using script"
66
-
# ./location_of_script_within_repo/buildscript.sh
76
+
# If the analyze step fails for one of the languages you are analyzing with
77
+
# "We were unable to automatically build your code", modify the matrix above
78
+
# to set the build mode to "manual" for that language. Then modify this step
79
+
# to build your code.
80
+
# ℹ️ Command-line programs to run using the OS shell.
81
+
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
82
+
- if: matrix.build-mode == 'manual'
83
+
run: |
84
+
echo 'If you are using a "manual" build mode for one or more of the' \
85
+
'languages you are analyzing, replace this with the commands to build' \
0 commit comments