|
19 | 19 | paths-ignore: |
20 | 20 | - "**/*.md" |
21 | 21 | - "**/*.gitignore" |
22 | | - - "**/*.gitattributes" |
| 22 | + - "**/*.gitattributes" |
23 | 23 | schedule: |
24 | | - - cron: '35 15 * * 2' |
| 24 | + - cron: '42 7 * * 5' |
25 | 25 |
|
26 | 26 | jobs: |
27 | 27 | analyze: |
28 | | - name: Analyze |
29 | | - runs-on: ubuntu-latest |
| 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' }} |
30 | 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 |
31 | 43 | actions: read |
32 | 44 | contents: read |
33 | | - security-events: write |
34 | 45 |
|
35 | 46 | strategy: |
36 | 47 | fail-fast: false |
37 | 48 | matrix: |
38 | | - language: [ 'csharp' ] |
39 | | - # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ] |
40 | | - # Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support |
41 | | - |
| 49 | + include: |
| 50 | + - language: actions |
| 51 | + build-mode: none |
| 52 | + - language: csharp |
| 53 | + build-mode: none |
| 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 |
42 | 62 | steps: |
43 | 63 | - name: Checkout repository |
44 | | - uses: actions/checkout@v3 |
| 64 | + uses: actions/checkout@v4 |
| 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 |
45 | 71 |
|
46 | 72 | # Initializes the CodeQL tools for scanning. |
47 | 73 | - name: Initialize CodeQL |
48 | | - uses: github/codeql-action/init@v2 |
| 74 | + uses: github/codeql-action/init@v3 |
49 | 75 | with: |
50 | 76 | languages: ${{ matrix.language }} |
| 77 | + build-mode: ${{ matrix.build-mode }} |
51 | 78 | # If you wish to specify custom queries, you can do so here or in a config file. |
52 | 79 | # By default, queries listed here will override any specified in a config file. |
53 | 80 | # Prefix the list here with "+" to use these queries and those in the config file. |
54 | 81 |
|
55 | | - # 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 |
| 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 |
56 | 83 | # queries: security-extended,security-and-quality |
57 | 84 |
|
58 | | - |
59 | | - # Autobuild attempts to build any compiled languages (C/C++, C#, Go, or Java). |
60 | | - # If this step fails, then you should remove it and run the build manually (see below) |
61 | | - - name: Autobuild |
62 | | - uses: github/codeql-action/autobuild@v2 |
63 | | - |
| 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. |
64 | 89 | # ℹ️ Command-line programs to run using the OS shell. |
65 | 90 | # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun |
66 | | - |
67 | | - # If the Autobuild fails above, remove it and uncomment the following three lines. |
68 | | - # modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance. |
69 | | - |
70 | | - # - run: | |
71 | | - # echo "Run, Build Application using script" |
72 | | - # ./location_of_script_within_repo/buildscript.sh |
| 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 |
73 | 100 |
|
74 | 101 | - name: Perform CodeQL Analysis |
75 | | - uses: github/codeql-action/analyze@v2 |
| 102 | + uses: github/codeql-action/analyze@v3 |
76 | 103 | with: |
77 | 104 | category: "/language:${{matrix.language}}" |
0 commit comments