From 15223f298f0252cd941d059575c6c6dafba1c87a Mon Sep 17 00:00:00 2001 From: Alexander Schwartz Date: Thu, 18 Sep 2025 14:18:06 +0200 Subject: [PATCH] Exclude invalid JavaScript files from CodeQL Closes #42664 Signed-off-by: Alexander Schwartz --- .github/actions/conditional/conditions | 2 ++ .github/codeql/codeql-config-javascript.yml | 3 +++ .github/codeql/codeql-config-typescript.yml | 3 +++ .github/workflows/codeql-analysis.yml | 2 ++ 4 files changed, 10 insertions(+) create mode 100644 .github/codeql/codeql-config-javascript.yml create mode 100644 .github/codeql/codeql-config-typescript.yml diff --git a/.github/actions/conditional/conditions b/.github/actions/conditional/conditions index 51d99feea57..4f42bc8e581 100644 --- a/.github/actions/conditional/conditions +++ b/.github/actions/conditional/conditions @@ -12,6 +12,8 @@ .github/workflows/operator-ci.yml operator .github/workflows/js-ci.yml js .github/workflows/codeql-analysis.yml codeql-java codeql-javascript codeql-typescript codeql-actions +.github/codeql/codeql-config-javascript.yml codeql-javascript +.github/codeql/codeql-config-typescript.yml codeql-typescript .github/workflows/guides.yml guides .github/workflows/documentation.yml documentation .github/workflows/*.yml codeql-actions diff --git a/.github/codeql/codeql-config-javascript.yml b/.github/codeql/codeql-config-javascript.yml new file mode 100644 index 00000000000..f623937d0cd --- /dev/null +++ b/.github/codeql/codeql-config-javascript.yml @@ -0,0 +1,3 @@ +paths-ignore: + # This file is invalid on purpose for testing. Exclude it to prevent an "Unexpected token" error in CodeQL being reported. + - testsuite/integration-arquillian/servers/auth-server/services/testsuite-providers-deployment/src/main/resources/scripts/test-bad-script-mapper3.js \ No newline at end of file diff --git a/.github/codeql/codeql-config-typescript.yml b/.github/codeql/codeql-config-typescript.yml new file mode 100644 index 00000000000..f623937d0cd --- /dev/null +++ b/.github/codeql/codeql-config-typescript.yml @@ -0,0 +1,3 @@ +paths-ignore: + # This file is invalid on purpose for testing. Exclude it to prevent an "Unexpected token" error in CodeQL being reported. + - testsuite/integration-arquillian/servers/auth-server/services/testsuite-providers-deployment/src/main/resources/scripts/test-bad-script-mapper3.js \ No newline at end of file diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index c3f239419d9..d1f3a01e721 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -92,6 +92,7 @@ jobs: CODEQL_ACTION_EXTRA_OPTIONS: '{"database":{"finalize":["--no-run-unnecessary-builds"]}}' with: languages: javascript + config-file: ./.github/codeql/codeql-config-javascript.yml - name: Perform CodeQL Analysis uses: github/codeql-action/analyze@192325c86100d080feab897ff886c34abd4c83a3 # v3.30.3 @@ -119,6 +120,7 @@ jobs: CODEQL_ACTION_EXTRA_OPTIONS: '{"database":{"finalize":["--no-run-unnecessary-builds"]}}' with: languages: typescript + config-file: ./.github/codeql/codeql-config-typescript.yml - name: Perform CodeQL Analysis uses: github/codeql-action/analyze@192325c86100d080feab897ff886c34abd4c83a3 # v3.30.3