Skip to content

Commit 6c2c16b

Browse files
splitting the job into three
1 parent 78fbf6f commit 6c2c16b

File tree

1 file changed

+115
-0
lines changed

1 file changed

+115
-0
lines changed

.github/workflows/codeql-advanced-security.yml

Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,3 +84,118 @@ jobs:
8484
uses: github/codeql-action/analyze@v3
8585
with:
8686
category: "/language:${{matrix.language}}"
87+
88+
analyze2:
89+
name: Analyze (${{ matrix.language }})
90+
runs-on: 'ubuntu-latest'
91+
permissions:
92+
# required for all workflows
93+
security-events: write
94+
95+
# required to fetch internal or private CodeQL packs
96+
packages: read
97+
98+
# only required for workflows in private repositories
99+
actions: read
100+
contents: read
101+
102+
strategy:
103+
fail-fast: false
104+
matrix:
105+
include:
106+
- language: java-kotlin
107+
build-mode: autobuild
108+
steps:
109+
- name: Checkout repository
110+
uses: actions/checkout@v4
111+
112+
# Add any setup steps before running the `github/codeql-action/init` action.
113+
# This includes steps like installing compilers or runtimes (`actions/setup-node`
114+
# or others). This is typically only required for manual builds.
115+
# - name: Setup runtime (example)
116+
# uses: actions/setup-example@v1
117+
118+
# Initializes the CodeQL tools for scanning.
119+
- name: Initialize CodeQL
120+
uses: github/codeql-action/init@v3
121+
with:
122+
languages: ${{ matrix.language }}
123+
build-mode: ${{ matrix.build-mode }}
124+
# If you wish to specify custom queries, you can do so here or in a config file.
125+
# By default, queries listed here will override any specified in a config file.
126+
# Prefix the list here with "+" to use these queries and those in the config file.
127+
128+
# 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
129+
queries: ${{ matrix.language && 'security-extended, security-and-quality' }}
130+
131+
- if: matrix.build-mode == 'manual'
132+
shell: bash
133+
run: |
134+
echo 'If you are using a "manual" build mode for one or more of the' \
135+
'languages you are analyzing, replace this with the commands to build' \
136+
'your code, for example:'
137+
echo ' make bootstrap'
138+
echo ' make release'
139+
exit 1
140+
- name: Perform CodeQL Analysis
141+
uses: github/codeql-action/analyze@v3
142+
with:
143+
category: "/language:${{matrix.language}}"
144+
145+
146+
analyze3:
147+
name: Analyze (${{ matrix.language }})
148+
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
149+
permissions:
150+
# required for all workflows
151+
security-events: write
152+
153+
# required to fetch internal or private CodeQL packs
154+
packages: read
155+
156+
# only required for workflows in private repositories
157+
actions: read
158+
contents: read
159+
160+
strategy:
161+
fail-fast: false
162+
matrix:
163+
include:
164+
- language: swift
165+
build-mode: autobuild
166+
steps:
167+
- name: Checkout repository
168+
uses: actions/checkout@v4
169+
170+
# Add any setup steps before running the `github/codeql-action/init` action.
171+
# This includes steps like installing compilers or runtimes (`actions/setup-node`
172+
# or others). This is typically only required for manual builds.
173+
# - name: Setup runtime (example)
174+
# uses: actions/setup-example@v1
175+
176+
# Initializes the CodeQL tools for scanning.
177+
- name: Initialize CodeQL
178+
uses: github/codeql-action/init@v3
179+
with:
180+
languages: ${{ matrix.language }}
181+
build-mode: ${{ matrix.build-mode }}
182+
# If you wish to specify custom queries, you can do so here or in a config file.
183+
# By default, queries listed here will override any specified in a config file.
184+
# Prefix the list here with "+" to use these queries and those in the config file.
185+
186+
# 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
187+
queries: ${{ matrix.language && 'security-extended, security-and-quality' }}
188+
189+
- if: matrix.build-mode == 'manual'
190+
shell: bash
191+
run: |
192+
echo 'If you are using a "manual" build mode for one or more of the' \
193+
'languages you are analyzing, replace this with the commands to build' \
194+
'your code, for example:'
195+
echo ' make bootstrap'
196+
echo ' make release'
197+
exit 1
198+
- name: Perform CodeQL Analysis
199+
uses: github/codeql-action/analyze@v3
200+
with:
201+
category: "/language:${{matrix.language}}"

0 commit comments

Comments
 (0)