|
1 | | -# SPDX-License-Identifier: PMPL-1.0-or-later |
| 1 | +# SPDX-License-Identifier: PMPL-1.0 |
2 | 2 | name: CodeQL Security Analysis |
3 | 3 |
|
4 | 4 | on: |
@@ -37,32 +37,13 @@ jobs: |
37 | 37 | - name: Checkout |
38 | 38 | uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 |
39 | 39 |
|
40 | | - # This repo is a declarative grammar extension with no JS/TS sources. |
41 | | - # CodeQL errors out ("no code found") when there is nothing to scan, |
42 | | - # so detect presence first and skip cleanly when absent. The step |
43 | | - # stays here so analysis activates automatically if JS/TS is added. |
44 | | - - name: Detect JavaScript/TypeScript sources |
45 | | - id: detect |
46 | | - run: | |
47 | | - if find . -path ./.git -prune -o -type f \ |
48 | | - \( -name '*.ts' -o -name '*.tsx' -o -name '*.js' \ |
49 | | - -o -name '*.jsx' -o -name '*.mjs' -o -name '*.cjs' \) \ |
50 | | - -print | grep -q .; then |
51 | | - echo "present=true" >> "$GITHUB_OUTPUT" |
52 | | - else |
53 | | - echo "present=false" >> "$GITHUB_OUTPUT" |
54 | | - echo "::notice::No JavaScript/TypeScript sources found — skipping CodeQL analysis." |
55 | | - fi |
56 | | -
|
57 | 40 | - name: Initialize CodeQL |
58 | | - if: steps.detect.outputs.present == 'true' |
59 | | - uses: github/codeql-action/init@0d579ffd059c29b07949a3cce3983f0780820c98 # v3.28.1 |
| 41 | + uses: github/codeql-action/init@c6f931105cb2c34c8f901cc885ba1e2e259cf745 # v3 |
60 | 42 | with: |
61 | 43 | languages: ${{ matrix.language }} |
62 | 44 | build-mode: ${{ matrix.build-mode }} |
63 | 45 |
|
64 | 46 | - name: Perform CodeQL Analysis |
65 | | - if: steps.detect.outputs.present == 'true' |
66 | | - uses: github/codeql-action/analyze@0d579ffd059c29b07949a3cce3983f0780820c98 # v3.28.1 |
| 47 | + uses: github/codeql-action/analyze@c6f931105cb2c34c8f901cc885ba1e2e259cf745 # v3 |
67 | 48 | with: |
68 | 49 | category: "/language:${{ matrix.language }}" |
0 commit comments