|
9 | 9 | # the `language` matrix defined below to confirm you have the correct set of |
10 | 10 | # supported CodeQL languages. |
11 | 11 | # |
12 | | -name: "CodeQL Advanced" |
13 | | - |
14 | | -paths: |
15 | | - - src |
16 | | - - docs-src |
17 | | - - test |
18 | | - - types |
19 | | -paths-ignore: |
20 | | - - "node_modules/**" |
21 | | - - "docs/**" |
| 12 | +name: 'CodeQL Advanced' |
22 | 13 |
|
23 | 14 | on: |
24 | | - push: |
25 | | - branches: [ "main" ] |
26 | | - pull_request: |
27 | | - branches: [ "main" ] |
28 | | - paths-ignore: |
29 | | - - "**/*.md" |
30 | | - schedule: |
31 | | - - cron: '42 2 * * 6' |
| 15 | + push: |
| 16 | + branches: ['main'] |
| 17 | + paths-ignore: |
| 18 | + - 'node_modules/**' |
| 19 | + - 'docs/**' |
| 20 | + pull_request: |
| 21 | + branches: ['main'] |
| 22 | + paths-ignore: |
| 23 | + - 'node_modules/**' |
| 24 | + - 'docs/**' |
| 25 | + - '**/*.md' |
| 26 | + schedule: |
| 27 | + - cron: '42 2 * * 6' |
32 | 28 |
|
33 | 29 | jobs: |
34 | | - analyze: |
35 | | - name: Analyze (${{ matrix.language }}) |
36 | | - # Runner size impacts CodeQL analysis time. To learn more, please see: |
37 | | - # - https://gh.io/recommended-hardware-resources-for-running-codeql |
38 | | - # - https://gh.io/supported-runners-and-hardware-resources |
39 | | - # - https://gh.io/using-larger-runners (GitHub.com only) |
40 | | - # Consider using larger runners or machines with greater resources for possible analysis time improvements. |
41 | | - runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }} |
42 | | - permissions: |
43 | | - # required for all workflows |
44 | | - security-events: write |
| 30 | + analyze: |
| 31 | + name: Analyze (${{ matrix.language }}) |
| 32 | + # Runner size impacts CodeQL analysis time. To learn more, please see: |
| 33 | + # - https://gh.io/recommended-hardware-resources-for-running-codeql |
| 34 | + # - https://gh.io/supported-runners-and-hardware-resources |
| 35 | + # - https://gh.io/using-larger-runners (GitHub.com only) |
| 36 | + # Consider using larger runners or machines with greater resources for possible analysis time improvements. |
| 37 | + runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }} |
| 38 | + permissions: |
| 39 | + # required for all workflows |
| 40 | + security-events: write |
45 | 41 |
|
46 | | - # required to fetch internal or private CodeQL packs |
47 | | - packages: read |
| 42 | + # required to fetch internal or private CodeQL packs |
| 43 | + packages: read |
48 | 44 |
|
49 | | - # only required for workflows in private repositories |
50 | | - actions: read |
51 | | - contents: read |
| 45 | + # only required for workflows in private repositories |
| 46 | + actions: read |
| 47 | + contents: read |
52 | 48 |
|
53 | | - strategy: |
54 | | - fail-fast: false |
55 | | - matrix: |
56 | | - include: |
57 | | - - language: actions |
58 | | - build-mode: none |
59 | | - - language: javascript-typescript |
60 | | - build-mode: none |
61 | | - # CodeQL supports the following values keywords for 'language': 'actions', 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'rust', 'swift' |
62 | | - # Use `c-cpp` to analyze code written in C, C++ or both |
63 | | - # Use 'java-kotlin' to analyze code written in Java, Kotlin or both |
64 | | - # Use 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both |
65 | | - # To learn more about changing the languages that are analyzed or customizing the build mode for your analysis, |
66 | | - # see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning. |
67 | | - # If you are analyzing a compiled language, you can modify the 'build-mode' for that language to customize how |
68 | | - # 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 |
69 | | - steps: |
70 | | - - name: Checkout repository |
71 | | - uses: actions/checkout@v4 |
| 49 | + strategy: |
| 50 | + fail-fast: false |
| 51 | + matrix: |
| 52 | + include: |
| 53 | + - language: actions |
| 54 | + build-mode: none |
| 55 | + - language: javascript-typescript |
| 56 | + build-mode: none |
| 57 | + # CodeQL supports the following values keywords for 'language': 'actions', 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'rust', 'swift' |
| 58 | + # Use `c-cpp` to analyze code written in C, C++ or both |
| 59 | + # Use 'java-kotlin' to analyze code written in Java, Kotlin or both |
| 60 | + # Use 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both |
| 61 | + # To learn more about changing the languages that are analyzed or customizing the build mode for your analysis, |
| 62 | + # see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning. |
| 63 | + # If you are analyzing a compiled language, you can modify the 'build-mode' for that language to customize how |
| 64 | + # 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 |
| 65 | + steps: |
| 66 | + - name: Checkout repository |
| 67 | + uses: actions/checkout@v4 |
72 | 68 |
|
73 | | - # Add any setup steps before running the `github/codeql-action/init` action. |
74 | | - # This includes steps like installing compilers or runtimes (`actions/setup-node` |
75 | | - # or others). This is typically only required for manual builds. |
76 | | - # - name: Setup runtime (example) |
77 | | - # uses: actions/setup-example@v1 |
| 69 | + # Add any setup steps before running the `github/codeql-action/init` action. |
| 70 | + # This includes steps like installing compilers or runtimes (`actions/setup-node` |
| 71 | + # or others). This is typically only required for manual builds. |
| 72 | + # - name: Setup runtime (example) |
| 73 | + # uses: actions/setup-example@v1 |
78 | 74 |
|
79 | | - # Initializes the CodeQL tools for scanning. |
80 | | - - name: Initialize CodeQL |
81 | | - uses: github/codeql-action/init@v4 |
82 | | - with: |
83 | | - languages: ${{ matrix.language }} |
84 | | - build-mode: ${{ matrix.build-mode }} |
85 | | - # If you wish to specify custom queries, you can do so here or in a config file. |
86 | | - # By default, queries listed here will override any specified in a config file. |
87 | | - # Prefix the list here with "+" to use these queries and those in the config file. |
| 75 | + # Initializes the CodeQL tools for scanning. |
| 76 | + - name: Initialize CodeQL |
| 77 | + uses: github/codeql-action/init@v4 |
| 78 | + with: |
| 79 | + languages: ${{ matrix.language }} |
| 80 | + build-mode: ${{ matrix.build-mode }} |
| 81 | + # If you wish to specify custom queries, you can do so here or in a config file. |
| 82 | + # By default, queries listed here will override any specified in a config file. |
| 83 | + # Prefix the list here with "+" to use these queries and those in the config file. |
88 | 84 |
|
89 | | - # 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 |
90 | | - # queries: security-extended,security-and-quality |
| 85 | + # 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 |
| 86 | + # queries: security-extended,security-and-quality |
91 | 87 |
|
92 | | - # If the analyze step fails for one of the languages you are analyzing with |
93 | | - # "We were unable to automatically build your code", modify the matrix above |
94 | | - # to set the build mode to "manual" for that language. Then modify this step |
95 | | - # to build your code. |
96 | | - # ℹ️ Command-line programs to run using the OS shell. |
97 | | - # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun |
98 | | - - name: Run manual build steps |
99 | | - if: matrix.build-mode == 'manual' |
100 | | - shell: bash |
101 | | - run: | |
102 | | - echo 'If you are using a "manual" build mode for one or more of the' \ |
103 | | - 'languages you are analyzing, replace this with the commands to build' \ |
104 | | - 'your code, for example:' |
105 | | - echo ' make bootstrap' |
106 | | - echo ' make release' |
107 | | - exit 1 |
| 88 | + # If the analyze step fails for one of the languages you are analyzing with |
| 89 | + # "We were unable to automatically build your code", modify the matrix above |
| 90 | + # to set the build mode to "manual" for that language. Then modify this step |
| 91 | + # to build your code. |
| 92 | + # ℹ️ Command-line programs to run using the OS shell. |
| 93 | + # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun |
| 94 | + - name: Run manual build steps |
| 95 | + if: matrix.build-mode == 'manual' |
| 96 | + shell: bash |
| 97 | + run: | |
| 98 | + echo 'If you are using a "manual" build mode for one or more of the' \ |
| 99 | + 'languages you are analyzing, replace this with the commands to build' \ |
| 100 | + 'your code, for example:' |
| 101 | + echo ' make bootstrap' |
| 102 | + echo ' make release' |
| 103 | + exit 1 |
108 | 104 |
|
109 | | - - name: Perform CodeQL Analysis |
110 | | - uses: github/codeql-action/analyze@v4 |
111 | | - with: |
112 | | - category: "/language:${{matrix.language}}" |
| 105 | + - name: Perform CodeQL Analysis |
| 106 | + uses: github/codeql-action/analyze@v4 |
| 107 | + with: |
| 108 | + category: '/language:${{matrix.language}}' |
0 commit comments