Skip to content

Commit 55c5b36

Browse files
committed
[SEC-6038] codeql workflow fix
1 parent 5080fe9 commit 55c5b36

1 file changed

Lines changed: 21 additions & 36 deletions

File tree

.github/workflows/codeql.yml

Lines changed: 21 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,28 @@
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-
#
121
name: "CodeQL Advanced"
132

143
on:
154
push:
165
branches: [ "master" ]
176
pull_request:
187
branches: [ "master" ]
8+
schedule:
9+
- cron: '0 0 * * 1' # Runs every Monday at midnight, this is to ensure that there is at least 1 scan every 7 days.
10+
11+
workflow_dispatch:
12+
inputs:
13+
pr_id:
14+
description: 'Pull Request ID'
15+
required: true
16+
type: string
17+
18+
concurrency:
19+
group: codeql-${{ github.ref }}
20+
cancel-in-progress: true
1921

2022
jobs:
2123
Analyze_Ruby_JSandTS:
2224
name: Analyze (${{ matrix.language }})
23-
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
25+
runs-on: gha-runner-no-perms
2426
permissions:
2527
# required for all workflows
2628
security-events: write
@@ -46,21 +48,12 @@ jobs:
4648
- name: Checkout repository
4749
uses: actions/checkout@v4
4850

49-
# Add any setup steps before running the `github/codeql-action/init` action.
50-
# This includes steps like installing compilers or runtimes (`actions/setup-node`
51-
# or others). This is typically only required for manual builds.
52-
# - name: Setup runtime (example)
53-
# uses: actions/setup-example@v1
54-
5551
# Initializes the CodeQL tools for scanning.
5652
- name: Initialize CodeQL
57-
uses: github/codeql-action/init@v3
53+
uses: github/codeql-action/init@v4
5854
with:
5955
languages: ${{ matrix.language }}
6056
build-mode: ${{ matrix.build-mode }}
61-
# If you wish to specify custom queries, you can do so here or in a config file.
62-
# By default, queries listed here will override any specified in a config file.
63-
# Prefix the list here with "+" to use these queries and those in the config file.
6457

6558
# 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
6659
queries: ${{ matrix.language && 'security-extended, security-and-quality' }}
@@ -75,7 +68,7 @@ jobs:
7568
echo ' make release'
7669
exit 1
7770
- name: Perform CodeQL Analysis
78-
uses: github/codeql-action/analyze@v3
71+
uses: github/codeql-action/analyze@v4
7972
with:
8073
category: "/language:${{matrix.language}}"
8174

@@ -106,12 +99,6 @@ jobs:
10699
- name: Checkout repository
107100
uses: actions/checkout@v4
108101

109-
# Add any setup steps before running the `github/codeql-action/init` action.
110-
# This includes steps like installing compilers or runtimes (`actions/setup-node`
111-
# or others). This is typically only required for manual builds.
112-
# - name: Setup runtime (example)
113-
# uses: actions/setup-example@v1
114-
115102
- name: Setup
116103
uses: ./.github/actions/setup
117104

@@ -129,27 +116,25 @@ jobs:
129116
130117
# Initializes the CodeQL tools for scanning.
131118
- name: Initialize CodeQL
132-
uses: github/codeql-action/init@v3
119+
uses: github/codeql-action/init@v4
133120
with:
134121
languages: ${{ matrix.language }}
135122
build-mode: ${{ matrix.build-mode }}
136-
# If you wish to specify custom queries, you can do so here or in a config file.
137-
# By default, queries listed here will override any specified in a config file.
138-
# Prefix the list here with "+" to use these queries and those in the config file.
139123

140124
# 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
141125
queries: ${{ matrix.language && 'security-extended, security-and-quality' }}
142126

143127
- if: matrix.build-mode == 'manual'
144128
shell: bash
145129
run: |
130+
mkdir example
146131
cd example
147132
yarn install
148133
cd android
149134
./gradlew clean
150135
151136
- name: Perform CodeQL Analysis
152-
uses: github/codeql-action/analyze@v3
137+
uses: github/codeql-action/analyze@v4
153138
with:
154139
category: "/language:${{matrix.language}}"
155140

@@ -187,7 +172,7 @@ jobs:
187172

188173
# Initializes the CodeQL tools for scanning.
189174
- name: Initialize CodeQL
190-
uses: github/codeql-action/init@v3
175+
uses: github/codeql-action/init@v4
191176
with:
192177
languages: ${{ matrix.language }}
193178
build-mode: ${{ matrix.build-mode }}
@@ -209,6 +194,6 @@ jobs:
209194
xcodebuild -workspace ReactNativeSdkExample.xcworkspace -scheme ReactNativeSdkExample -configuration Debug -destination 'platform=iOS Simulator,name=iPhone 16' build
210195
211196
- name: Perform CodeQL Analysis
212-
uses: github/codeql-action/analyze@v3
197+
uses: github/codeql-action/analyze@v4
213198
with:
214199
category: "/language:${{matrix.language}}"

0 commit comments

Comments
 (0)