Skip to content

Commit 110e183

Browse files
chore: update CodeQL workflow to match GitHub advanced setup
1 parent 53ca649 commit 110e183

File tree

1 file changed

+15
-9
lines changed

1 file changed

+15
-9
lines changed

.github/workflows/codeql.yml

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,23 @@ on:
1010

1111
jobs:
1212
analyze:
13-
name: Analyze
13+
name: Analyze (${{ matrix.language }})
1414
runs-on: ubuntu-latest
1515
permissions:
16+
# required for all workflows
17+
security-events: write
18+
# required to fetch internal or private CodeQL packs
19+
packages: read
20+
# only required for workflows in private repositories
1621
actions: read
1722
contents: read
18-
security-events: write
1923

2024
strategy:
2125
fail-fast: false
2226
matrix:
23-
language: [ 'javascript' ]
27+
include:
28+
- language: javascript-typescript
29+
build-mode: none
2430

2531
steps:
2632
- name: Clean up disk space
@@ -30,7 +36,7 @@ jobs:
3036
echo ""
3137
echo "Cleaning up unnecessary files to free disk space..."
3238
33-
# Remove large tool directories that aren't needed for JavaScript CodeQL analysis
39+
# Remove large tool directories that aren't needed for JavaScript/TypeScript CodeQL analysis
3440
# These tools will be re-downloaded by GitHub Actions if needed for other jobs
3541
sudo rm -rf /usr/share/dotnet
3642
sudo rm -rf /opt/ghc
@@ -61,17 +67,17 @@ jobs:
6167
- name: Checkout repository
6268
uses: actions/checkout@v4
6369

70+
# Initializes the CodeQL tools for scanning.
6471
- name: Initialize CodeQL
65-
uses: github/codeql-action/init@v3
72+
uses: github/codeql-action/init@v4
6673
with:
6774
languages: ${{ matrix.language }}
75+
build-mode: ${{ matrix.build-mode }}
76+
# Use our custom config file to exclude unnecessary files
6877
config-file: ./.github/codeql/codeql-config.yml
6978

70-
- name: Autobuild
71-
uses: github/codeql-action/autobuild@v3
72-
7379
- name: Perform CodeQL Analysis
74-
uses: github/codeql-action/analyze@v3
80+
uses: github/codeql-action/analyze@v4
7581
with:
7682
category: "/language:${{matrix.language}}"
7783

0 commit comments

Comments
 (0)