|
20 | 20 | CODEQL_ACTION_TESTING_ENVIRONMENT: codeql-action-pr-checks |
21 | 21 |
|
22 | 22 | jobs: |
23 | | - # Identify the CodeQL tool versions to use in the analysis job. |
24 | | - check-codeql-versions: |
25 | | - if: github.triggering_actor != 'dependabot[bot]' |
26 | | - runs-on: ubuntu-latest |
27 | | - outputs: |
28 | | - versions: ${{ steps.compare.outputs.versions }} |
29 | | - |
30 | | - permissions: |
31 | | - contents: read |
32 | | - |
33 | | - steps: |
34 | | - - uses: actions/checkout@v5 |
35 | | - - name: Init with default CodeQL bundle from the VM image |
36 | | - id: init-default |
37 | | - uses: ./init |
38 | | - with: |
39 | | - languages: javascript |
40 | | - - name: Remove empty database |
41 | | - # allows us to run init a second time |
42 | | - run: | |
43 | | - rm -rf "$RUNNER_TEMP/codeql_databases" |
44 | | - - name: Init with latest CodeQL bundle |
45 | | - id: init-latest |
46 | | - uses: ./init |
47 | | - with: |
48 | | - tools: linked |
49 | | - languages: javascript |
50 | | - - name: Compare default and latest CodeQL bundle versions |
51 | | - id: compare |
52 | | - env: |
53 | | - CODEQL_DEFAULT: ${{ steps.init-default.outputs.codeql-path }} |
54 | | - CODEQL_LATEST: ${{ steps.init-latest.outputs.codeql-path }} |
55 | | - run: | |
56 | | - CODEQL_VERSION_DEFAULT="$("$CODEQL_DEFAULT" version --format terse)" |
57 | | - CODEQL_VERSION_LATEST="$("$CODEQL_LATEST" version --format terse)" |
58 | | - echo "Default CodeQL bundle version is $CODEQL_VERSION_DEFAULT" |
59 | | - echo "Latest CodeQL bundle version is $CODEQL_VERSION_LATEST" |
60 | | -
|
61 | | - # If we're running on a pull request, run with both bundles, even if `tools: linked` would |
62 | | - # be the same as `tools: null`. This allows us to make the job for each of the bundles a |
63 | | - # required status check. |
64 | | - # |
65 | | - # If we're running on push or schedule, then we can skip running with `tools: linked` when it would be |
66 | | - # the same as running with `tools: null`. |
67 | | - if [[ "$GITHUB_EVENT_NAME" != "pull_request" && "$CODEQL_VERSION_DEFAULT" == "$CODEQL_VERSION_LATEST" ]]; then |
68 | | - VERSIONS_JSON='[null]' |
69 | | - else |
70 | | - VERSIONS_JSON='[null, "linked"]' |
71 | | - fi |
72 | | -
|
73 | | - # Output a JSON-encoded list with the distinct versions to test against. |
74 | | - echo "Suggested matrix config for analysis job: $VERSIONS_JSON" |
75 | | - echo "versions=${VERSIONS_JSON}" >> $GITHUB_OUTPUT |
76 | | -
|
77 | 23 | analyze-javascript: |
78 | 24 | if: github.triggering_actor != 'dependabot[bot]' |
79 | | - needs: [check-codeql-versions] |
80 | 25 | strategy: |
81 | 26 | fail-fast: false |
82 | 27 | matrix: |
83 | | - os: [ubuntu-22.04,ubuntu-24.04,windows-2022,windows-2025,macos-14,macos-15] |
84 | | - tools: ${{ fromJson(needs.check-codeql-versions.outputs.versions) }} |
| 28 | + os: [ubuntu-24.04] |
| 29 | + tools: [""] |
85 | 30 | runs-on: ${{ matrix.os }} |
86 | 31 |
|
87 | 32 | permissions: |
@@ -109,37 +54,3 @@ jobs: |
109 | 54 | with: |
110 | 55 | category: "/language:javascript" |
111 | 56 | upload: ${{ (matrix.os == 'ubuntu-24.04' && !matrix.tools && 'always') || 'never' }} |
112 | | - |
113 | | - analyze-other: |
114 | | - if: github.triggering_actor != 'dependabot[bot]' |
115 | | - runs-on: ubuntu-latest |
116 | | - |
117 | | - strategy: |
118 | | - fail-fast: false |
119 | | - matrix: |
120 | | - include: |
121 | | - - language: actions |
122 | | - - language: python |
123 | | - |
124 | | - permissions: |
125 | | - contents: read |
126 | | - security-events: write |
127 | | - |
128 | | - steps: |
129 | | - - name: Checkout |
130 | | - uses: actions/checkout@v5 |
131 | | - - name: Initialize CodeQL |
132 | | - uses: ./init |
133 | | - with: |
134 | | - languages: ${{ matrix.language }} |
135 | | - build-mode: none |
136 | | - config: > |
137 | | - paths-ignore: |
138 | | - - lib |
139 | | - - tests |
140 | | - queries: |
141 | | - - uses: security-and-quality |
142 | | - - name: Perform CodeQL Analysis |
143 | | - uses: ./analyze |
144 | | - with: |
145 | | - category: "/language:${{ matrix.language }}" |
0 commit comments