|
1 | | -# SPDX-License-Identifier: PMPL-1.0-or-later |
2 | | -# For most projects, this workflow file will not need changing; you simply need |
3 | | -# to commit it to your repository. |
4 | | -# |
5 | | -# You may wish to alter this file to override the set of languages analyzed, |
6 | | -# or to provide custom queries or build logic. |
7 | | -# |
8 | | -# ******** NOTE ******** |
9 | | -# We have attempted to detect the languages in your repository. Please check |
10 | | -# the `language` matrix defined below to confirm you have the correct set of |
11 | | -# supported CodeQL languages. |
12 | | -# |
13 | | -permissions: |
14 | | - contents: read |
15 | | - |
16 | | -name: "CodeQL Advanced" |
| 1 | +# SPDX-License-Identifier: PMPL-1.0 |
| 2 | +name: CodeQL Security Analysis |
17 | 3 |
|
18 | 4 | on: |
19 | 5 | push: |
20 | | - branches: [ "main" ] |
| 6 | + branches: [main, master] |
21 | 7 | pull_request: |
22 | | - branches: [ "main" ] |
| 8 | + branches: [main, master] |
23 | 9 | schedule: |
24 | | - - cron: '15 14 * * 3' |
| 10 | + - cron: '0 6 * * 1' |
| 11 | + |
| 12 | +# Estate guardrail: cancel superseded runs so re-pushes / rebased PR |
| 13 | +# updates do not pile up queued runs against the shared account-wide |
| 14 | +# Actions concurrency pool. Applied only to read-only check workflows |
| 15 | +# (no publish/mutation), so cancelling a superseded run is always safe. |
| 16 | +concurrency: |
| 17 | + group: ${{ github.workflow }}-${{ github.ref }} |
| 18 | + cancel-in-progress: true |
| 19 | + |
| 20 | +permissions: |
| 21 | + contents: read |
25 | 22 |
|
26 | 23 | jobs: |
27 | 24 | analyze: |
28 | | - name: Analyze (${{ matrix.language }}) |
29 | | - # Runner size impacts CodeQL analysis time. To learn more, please see: |
30 | | - # - https://gh.io/recommended-hardware-resources-for-running-codeql |
31 | | - # - https://gh.io/supported-runners-and-hardware-resources |
32 | | - # - https://gh.io/using-larger-runners (GitHub.com only) |
33 | | - # Consider using larger runners or machines with greater resources for possible analysis time improvements. |
34 | | - runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }} |
| 25 | + runs-on: ubuntu-latest |
35 | 26 | permissions: |
36 | | - # required for all workflows |
37 | | - security-events: write |
38 | | - |
39 | | - # required to fetch internal or private CodeQL packs |
40 | | - packages: read |
41 | | - |
42 | | - # only required for workflows in private repositories |
43 | | - actions: read |
44 | 27 | contents: read |
45 | | - |
| 28 | + security-events: write |
46 | 29 | strategy: |
47 | 30 | fail-fast: false |
48 | 31 | matrix: |
49 | 32 | include: |
50 | | - - language: javascript-typescript |
51 | | - build-mode: none |
52 | | - - language: rust |
53 | | - build-mode: none |
54 | | - # CodeQL supports the following values keywords for 'language': 'actions', 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'rust', 'swift' |
55 | | - # Use `c-cpp` to analyze code written in C, C++ or both |
56 | | - # Use 'java-kotlin' to analyze code written in Java, Kotlin or both |
57 | | - # Use 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both |
58 | | - # To learn more about changing the languages that are analyzed or customizing the build mode for your analysis, |
59 | | - # see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning. |
60 | | - # If you are analyzing a compiled language, you can modify the 'build-mode' for that language to customize how |
61 | | - # your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages |
62 | | - steps: |
63 | | - - name: Checkout repository |
64 | | -<<<<<<< HEAD |
65 | | - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 |
66 | | -======= |
67 | | - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 |
68 | | ->>>>>>> 2928af7 (chore: batch RSR compliance) |
69 | | - |
70 | | - # Add any setup steps before running the `github/codeql-action/init` action. |
71 | | - # This includes steps like installing compilers or runtimes (`actions/setup-node` |
72 | | - # or others). This is typically only required for manual builds. |
73 | | - # - name: Setup runtime (example) |
74 | | - # uses: actions/setup-example@v1 |
| 33 | + - language: javascript-typescript |
| 34 | + build-mode: none |
75 | 35 |
|
76 | | - # Initializes the CodeQL tools for scanning. |
77 | | - - name: Initialize CodeQL |
78 | | - uses: github/codeql-action/init@b2f9ef845756500b97acbdaf5c1dd4e9c1d15734 # v3 |
79 | | - with: |
80 | | - languages: ${{ matrix.language }} |
81 | | - build-mode: ${{ matrix.build-mode }} |
82 | | - # If you wish to specify custom queries, you can do so here or in a config file. |
83 | | - # By default, queries listed here will override any specified in a config file. |
84 | | - # Prefix the list here with "+" to use these queries and those in the config file. |
85 | | - |
86 | | - # For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs |
87 | | - # queries: security-extended,security-and-quality |
88 | | - |
89 | | - # If the analyze step fails for one of the languages you are analyzing with |
90 | | - # "We were unable to automatically build your code", modify the matrix above |
91 | | - # to set the build mode to "manual" for that language. Then modify this step |
92 | | - # to build your code. |
93 | | - # ℹ️ Command-line programs to run using the OS shell. |
94 | | - # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun |
95 | | - - name: Run manual build steps |
96 | | - if: matrix.build-mode == 'manual' |
97 | | - shell: bash |
98 | | - run: | |
99 | | - echo 'If you are using a "manual" build mode for one or more of the' \ |
100 | | - 'languages you are analyzing, replace this with the commands to build' \ |
101 | | - 'your code, for example:' |
102 | | - echo ' make bootstrap' |
103 | | - echo ' make release' |
104 | | - exit 1 |
105 | | -
|
106 | | - - name: Perform CodeQL Analysis |
107 | | - uses: github/codeql-action/analyze@b2f9ef845756500b97acbdaf5c1dd4e9c1d15734 # v3 |
108 | | - with: |
109 | | - category: "/language:${{matrix.language}}" |
| 36 | + steps: |
| 37 | + - name: Checkout |
| 38 | + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 |
| 39 | + |
| 40 | + - name: Initialize CodeQL |
| 41 | + uses: github/codeql-action/init@c6f931105cb2c34c8f901cc885ba1e2e259cf745 # v3 |
| 42 | + with: |
| 43 | + languages: ${{ matrix.language }} |
| 44 | + build-mode: ${{ matrix.build-mode }} |
| 45 | + |
| 46 | + - name: Perform CodeQL Analysis |
| 47 | + uses: github/codeql-action/analyze@c6f931105cb2c34c8f901cc885ba1e2e259cf745 # v3 |
| 48 | + with: |
| 49 | + category: "/language:${{ matrix.language }}" |
0 commit comments