Skip to content

Commit 7b39845

Browse files
committed
tools: enable CodeQL config file
A previous change designed to ignore test files in CodeQL scans had multiple problems. This fixes the CodeQL scan breakage. It adds a CodeQL config file, which allows us to ignore the test directory in our scans. Refs: nodejs#57978 (comment) Refs: https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning#specifying-directories-to-scan
1 parent 3e996df commit 7b39845

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

.github/codeql-config.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
name: "My CodeQL config"
2+
3+
paths-ignore:
4+
- test

.github/workflows/codeql.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,11 @@ name: Run CodeQL
33
on:
44
schedule:
55
- cron: 0 0 * * *
6+
workflow_dispatch:
67

78
permissions:
89
contents: read
910

10-
paths-to-ignore:
11-
- test
12-
1311
jobs:
1412
analyze:
1513
name: Analyze
@@ -33,6 +31,7 @@ jobs:
3331
uses: github/codeql-action/init@6bb031afdd8eb862ea3fc1848194185e076637e5 # v3.28.11
3432
with:
3533
languages: ${{ matrix.language }}
34+
config-file: ./.github/codeql-config.yml
3635

3736
- name: Autobuild
3837
uses: github/codeql-action/autobuild@6bb031afdd8eb862ea3fc1848194185e076637e5 # v3.28.11

0 commit comments

Comments
 (0)