Skip to content

Commit a38f19f

Browse files
feat(ci): add javascript-typescript into CodeQL config (#3227)
* codeql config update Signed-off-by: Barabanov, Alexander <[email protected]> * add condition Signed-off-by: Barabanov, Alexander <[email protected]> * update comment Signed-off-by: Barabanov, Alexander <[email protected]> * restore lock Signed-off-by: Barabanov, Alexander <[email protected]> --------- Signed-off-by: Barabanov, Alexander <[email protected]>
1 parent bbcd5b6 commit a38f19f

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

.github/workflows/codeql.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ jobs:
1919
runs-on: ubuntu-latest
2020
permissions:
2121
security-events: write # required to publish sarif
22-
2322
strategy:
2423
fail-fast: false
2524
matrix:
@@ -28,27 +27,34 @@ jobs:
2827
build-mode: none
2928
- language: python
3029
build-mode: none
31-
30+
- language: javascript-typescript
31+
build-mode: none
32+
# FIXME: Temporary restriction: do not run for javascript-typescript, unless on push and PR for geti-inspect feature branch.
33+
# This prevents JavaScript/TypeScript CodeQL analysis (job failure) on unrelated branches and should be removed once feature/geti-inspect will be merged into the main
3234
steps:
3335
- name: Harden the runner (audit all outbound calls)
36+
if: matrix.language != 'javascript-typescript' || (github.event_name != 'schedule' && (contains(github.ref, 'feature/geti-inspect') || contains(github.base_ref, 'feature/geti-inspect')))
3437
uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
3538
with:
3639
egress-policy: audit
3740

3841
- name: Checkout repository
42+
if: matrix.language != 'javascript-typescript' || (github.event_name != 'schedule' && (contains(github.ref, 'feature/geti-inspect') || contains(github.base_ref, 'feature/geti-inspect')))
3943
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
4044
with:
4145
persist-credentials: false
4246

4347
# Initializes the CodeQL tools for scanning.
4448
- name: Initialize CodeQL
49+
if: matrix.language != 'javascript-typescript' || (github.event_name != 'schedule' && (contains(github.ref, 'feature/geti-inspect') || contains(github.base_ref, 'feature/geti-inspect')))
4550
uses: github/codeql-action/init@64d10c13136e1c5bce3e5fbde8d4906eeaafc885 # v3.30.6
4651
with:
4752
languages: ${{ matrix.language }}
4853
build-mode: ${{ matrix.build-mode }}
4954
queries: security-extended
5055

5156
- name: Perform CodeQL Analysis
57+
if: matrix.language != 'javascript-typescript' || (github.event_name != 'schedule' && (contains(github.ref, 'feature/geti-inspect') || contains(github.base_ref, 'feature/geti-inspect')))
5258
uses: github/codeql-action/analyze@64d10c13136e1c5bce3e5fbde8d4906eeaafc885 # v3.30.6
5359
with:
5460
category: "/language:${{matrix.language}}"

0 commit comments

Comments
 (0)