|
10 | 10 |
|
11 | 11 | jobs: |
12 | 12 | analyze: |
13 | | - name: Analyze |
| 13 | + name: Analyze (${{ matrix.language }}) |
14 | 14 | runs-on: ubuntu-latest |
15 | 15 | 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 |
16 | 21 | actions: read |
17 | 22 | contents: read |
18 | | - security-events: write |
19 | 23 |
|
20 | 24 | strategy: |
21 | 25 | fail-fast: false |
22 | 26 | matrix: |
23 | | - language: [ 'javascript' ] |
| 27 | + include: |
| 28 | + - language: javascript-typescript |
| 29 | + build-mode: none |
24 | 30 |
|
25 | 31 | steps: |
26 | 32 | - name: Clean up disk space |
|
30 | 36 | echo "" |
31 | 37 | echo "Cleaning up unnecessary files to free disk space..." |
32 | 38 | |
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 |
34 | 40 | # These tools will be re-downloaded by GitHub Actions if needed for other jobs |
35 | 41 | sudo rm -rf /usr/share/dotnet |
36 | 42 | sudo rm -rf /opt/ghc |
@@ -61,17 +67,17 @@ jobs: |
61 | 67 | - name: Checkout repository |
62 | 68 | uses: actions/checkout@v4 |
63 | 69 |
|
| 70 | + # Initializes the CodeQL tools for scanning. |
64 | 71 | - name: Initialize CodeQL |
65 | | - uses: github/codeql-action/init@v3 |
| 72 | + uses: github/codeql-action/init@v4 |
66 | 73 | with: |
67 | 74 | languages: ${{ matrix.language }} |
| 75 | + build-mode: ${{ matrix.build-mode }} |
| 76 | + # Use our custom config file to exclude unnecessary files |
68 | 77 | config-file: ./.github/codeql/codeql-config.yml |
69 | 78 |
|
70 | | - - name: Autobuild |
71 | | - uses: github/codeql-action/autobuild@v3 |
72 | | - |
73 | 79 | - name: Perform CodeQL Analysis |
74 | | - uses: github/codeql-action/analyze@v3 |
| 80 | + uses: github/codeql-action/analyze@v4 |
75 | 81 | with: |
76 | 82 | category: "/language:${{matrix.language}}" |
77 | 83 |
|
0 commit comments