|
1 | | -# For most projects, this workflow file will not need changing; you simply need |
2 | | -# to commit it to your repository. |
3 | | -# |
4 | | -# You may wish to alter this file to override the set of languages analyzed, |
5 | | -# or to provide custom queries or build logic. |
6 | | -# |
7 | | -# ******** NOTE ******** |
8 | | -# We have attempted to detect the languages in your repository. Please check |
9 | | -# the `language` matrix defined below to confirm you have the correct set of |
10 | | -# supported CodeQL languages. |
11 | | -# |
12 | | -name: "CodeQL" |
13 | | - |
14 | | -# This workflow is configured to be called by other workflows for more controlled execution |
15 | | -# This allows integration with the main CI pipeline and avoids redundant runs |
16 | | -# To enable automatic execution, uncomment the triggers below: |
17 | | -on: |
18 | | - workflow_call: |
19 | | - schedule: |
20 | | - - cron: '44 16 * * 6' |
21 | | - # push: |
22 | | - # branches: [ "master" ] |
23 | | - # pull_request: |
24 | | - # branches: [ "master" ] |
25 | | - |
26 | | -jobs: |
27 | | - 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' }} |
35 | | - 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 | | - contents: read |
45 | | - |
46 | | - strategy: |
47 | | - fail-fast: false |
48 | | - matrix: |
49 | | - include: |
50 | | - - language: actions |
51 | | - build-mode: none |
52 | | - - language: go |
53 | | - build-mode: autobuild |
54 | | - # CodeQL supports the following values keywords for 'language': 'actions', 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', '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 | | - uses: actions/checkout@v5 |
65 | | - |
66 | | - # Add any setup steps before running the `github/codeql-action/init` action. |
67 | | - # This includes steps like installing compilers or runtimes (`actions/setup-node` |
68 | | - # or others). This is typically only required for manual builds. |
69 | | - # - name: Setup runtime (example) |
70 | | - # uses: actions/setup-example@v1 |
71 | | - |
72 | | - # Initializes the CodeQL tools for scanning. |
73 | | - - name: Initialize CodeQL |
74 | | - uses: github/codeql-action/init@v4 |
75 | | - with: |
76 | | - languages: ${{ matrix.language }} |
77 | | - build-mode: ${{ matrix.build-mode }} |
78 | | - # If you wish to specify custom queries, you can do so here or in a config file. |
79 | | - # By default, queries listed here will override any specified in a config file. |
80 | | - # Prefix the list here with "+" to use these queries and those in the config file. |
81 | | - |
82 | | - # 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 |
83 | | - # queries: security-extended,security-and-quality |
84 | | - |
85 | | - # If the analyze step fails for one of the languages you are analyzing with |
86 | | - # "We were unable to automatically build your code", modify the matrix above |
87 | | - # to set the build mode to "manual" for that language. Then modify this step |
88 | | - # to build your code. |
89 | | - # ℹ️ Command-line programs to run using the OS shell. |
90 | | - # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun |
91 | | - - if: matrix.build-mode == 'manual' |
92 | | - shell: bash |
93 | | - run: | |
94 | | - echo 'If you are using a "manual" build mode for one or more of the' \ |
95 | | - 'languages you are analyzing, replace this with the commands to build' \ |
96 | | - 'your code, for example:' |
97 | | - echo ' make bootstrap' |
98 | | - echo ' make release' |
99 | | - exit 1 |
100 | | -
|
101 | | - - name: Perform CodeQL Analysis |
102 | | - uses: github/codeql-action/analyze@v4 |
103 | | - with: |
104 | | - category: "/language:${{matrix.language}}" |
| 1 | +# For most projects, this workflow file will not need changing; you simply need |
| 2 | +# to commit it to your repository. |
| 3 | +# |
| 4 | +# You may wish to alter this file to override the set of languages analyzed, |
| 5 | +# or to provide custom queries or build logic. |
| 6 | +# |
| 7 | +# ******** NOTE ******** |
| 8 | +# We have attempted to detect the languages in your repository. Please check |
| 9 | +# the `language` matrix defined below to confirm you have the correct set of |
| 10 | +# supported CodeQL languages. |
| 11 | +# |
| 12 | +name: "CodeQL" |
| 13 | + |
| 14 | +# This workflow is configured to be called by other workflows for more controlled execution |
| 15 | +# This allows integration with the main CI pipeline and avoids redundant runs |
| 16 | +# To enable automatic execution, uncomment the triggers below: |
| 17 | +on: |
| 18 | + workflow_call: |
| 19 | + schedule: |
| 20 | + - cron: '44 16 * * 6' |
| 21 | + # push: |
| 22 | + # branches: [ "master" ] |
| 23 | + # pull_request: |
| 24 | + # branches: [ "master" ] |
| 25 | + |
| 26 | +jobs: |
| 27 | + 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' }} |
| 35 | + 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 | + contents: read |
| 45 | + |
| 46 | + strategy: |
| 47 | + fail-fast: false |
| 48 | + matrix: |
| 49 | + include: |
| 50 | + - language: actions |
| 51 | + build-mode: none |
| 52 | + - language: go |
| 53 | + build-mode: autobuild |
| 54 | + # CodeQL supports the following values keywords for 'language': 'actions', 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', '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 | + uses: actions/checkout@v5 |
| 65 | + |
| 66 | + # Add any setup steps before running the `github/codeql-action/init` action. |
| 67 | + # This includes steps like installing compilers or runtimes (`actions/setup-node` |
| 68 | + # or others). This is typically only required for manual builds. |
| 69 | + # - name: Setup runtime (example) |
| 70 | + # uses: actions/setup-example@v1 |
| 71 | + |
| 72 | + # Initializes the CodeQL tools for scanning. |
| 73 | + - name: Initialize CodeQL |
| 74 | + uses: github/codeql-action/init@v4 |
| 75 | + with: |
| 76 | + languages: ${{ matrix.language }} |
| 77 | + build-mode: ${{ matrix.build-mode }} |
| 78 | + # If you wish to specify custom queries, you can do so here or in a config file. |
| 79 | + # By default, queries listed here will override any specified in a config file. |
| 80 | + # Prefix the list here with "+" to use these queries and those in the config file. |
| 81 | + |
| 82 | + # 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 |
| 83 | + # queries: security-extended,security-and-quality |
| 84 | + |
| 85 | + # If the analyze step fails for one of the languages you are analyzing with |
| 86 | + # "We were unable to automatically build your code", modify the matrix above |
| 87 | + # to set the build mode to "manual" for that language. Then modify this step |
| 88 | + # to build your code. |
| 89 | + # ℹ️ Command-line programs to run using the OS shell. |
| 90 | + # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun |
| 91 | + - if: matrix.build-mode == 'manual' |
| 92 | + shell: bash |
| 93 | + run: | |
| 94 | + echo 'If you are using a "manual" build mode for one or more of the' \ |
| 95 | + 'languages you are analyzing, replace this with the commands to build' \ |
| 96 | + 'your code, for example:' |
| 97 | + echo ' make bootstrap' |
| 98 | + echo ' make release' |
| 99 | + exit 1 |
| 100 | +
|
| 101 | + - name: Perform CodeQL Analysis |
| 102 | + uses: github/codeql-action/analyze@v4 |
| 103 | + with: |
| 104 | + category: "/language:${{matrix.language}}" |
0 commit comments