|
15 | 15 | push:
|
16 | 16 | branches: [ "master" ]
|
17 | 17 | pull_request:
|
18 |
| - # The branches below must be a subset of the branches above |
19 | 18 | branches: [ "master" ]
|
20 | 19 | schedule:
|
21 |
| - - cron: '33 16 * * 0' |
| 20 | + - cron: '26 8 * * 4' |
22 | 21 |
|
23 | 22 | jobs:
|
24 | 23 | analyze:
|
25 |
| - name: Analyze |
26 |
| - runs-on: ubuntu-latest |
| 24 | + name: Analyze (${{ matrix.language }}) |
| 25 | + # Runner size impacts CodeQL analysis time. To learn more, please see: |
| 26 | + # - https://gh.io/recommended-hardware-resources-for-running-codeql |
| 27 | + # - https://gh.io/supported-runners-and-hardware-resources |
| 28 | + # - https://gh.io/using-larger-runners (GitHub.com only) |
| 29 | + # Consider using larger runners or machines with greater resources for possible analysis time improvements. |
| 30 | + runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }} |
| 31 | + timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }} |
27 | 32 | permissions:
|
| 33 | + # required for all workflows |
| 34 | + security-events: write |
| 35 | + |
| 36 | + # required to fetch internal or private CodeQL packs |
| 37 | + packages: read |
| 38 | + |
| 39 | + # only required for workflows in private repositories |
28 | 40 | actions: read
|
29 | 41 | contents: read
|
30 |
| - security-events: write |
31 | 42 |
|
32 | 43 | strategy:
|
33 | 44 | fail-fast: false
|
34 | 45 | matrix:
|
35 |
| - language: [ 'python' ] |
36 |
| - # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ] |
37 |
| - # Use only 'java' to analyze code written in Java, Kotlin or both |
38 |
| - # Use only 'javascript' to analyze code written in JavaScript, TypeScript or both |
39 |
| - # Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support |
40 |
| - |
| 46 | + include: |
| 47 | + - language: python |
| 48 | + build-mode: none |
| 49 | + # CodeQL supports the following values keywords for 'language': 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift' |
| 50 | + # Use `c-cpp` to analyze code written in C, C++ or both |
| 51 | + # Use 'java-kotlin' to analyze code written in Java, Kotlin or both |
| 52 | + # Use 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both |
| 53 | + # To learn more about changing the languages that are analyzed or customizing the build mode for your analysis, |
| 54 | + # see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning. |
| 55 | + # If you are analyzing a compiled language, you can modify the 'build-mode' for that language to customize how |
| 56 | + # 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 |
41 | 57 | steps:
|
42 | 58 | - name: Checkout repository
|
43 |
| - uses: actions/checkout@v3 |
| 59 | + uses: actions/checkout@v4 |
44 | 60 |
|
45 | 61 | # Initializes the CodeQL tools for scanning.
|
46 | 62 | - name: Initialize CodeQL
|
47 |
| - uses: github/codeql-action/init@v2 |
| 63 | + uses: github/codeql-action/init@v3 |
48 | 64 | with:
|
49 | 65 | languages: ${{ matrix.language }}
|
| 66 | + build-mode: ${{ matrix.build-mode }} |
50 | 67 | # If you wish to specify custom queries, you can do so here or in a config file.
|
51 | 68 | # By default, queries listed here will override any specified in a config file.
|
52 | 69 | # Prefix the list here with "+" to use these queries and those in the config file.
|
53 | 70 |
|
54 |
| - # 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 |
| 71 | + # 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 |
55 | 72 | # queries: security-extended,security-and-quality
|
56 | 73 |
|
57 |
| - |
58 |
| - # Autobuild attempts to build any compiled languages (C/C++, C#, Go, or Java). |
59 |
| - # If this step fails, then you should remove it and run the build manually (see below) |
60 |
| - - name: Autobuild |
61 |
| - uses: github/codeql-action/autobuild@v2 |
62 |
| - |
| 74 | + # If the analyze step fails for one of the languages you are analyzing with |
| 75 | + # "We were unable to automatically build your code", modify the matrix above |
| 76 | + # to set the build mode to "manual" for that language. Then modify this step |
| 77 | + # to build your code. |
63 | 78 | # ℹ️ Command-line programs to run using the OS shell.
|
64 | 79 | # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
|
65 |
| - |
66 |
| - # If the Autobuild fails above, remove it and uncomment the following three lines. |
67 |
| - # modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance. |
68 |
| - |
69 |
| - # - run: | |
70 |
| - # echo "Run, Build Application using script" |
71 |
| - # ./location_of_script_within_repo/buildscript.sh |
| 80 | + - if: matrix.build-mode == 'manual' |
| 81 | + shell: bash |
| 82 | + run: | |
| 83 | + echo 'If you are using a "manual" build mode for one or more of the' \ |
| 84 | + 'languages you are analyzing, replace this with the commands to build' \ |
| 85 | + 'your code, for example:' |
| 86 | + echo ' make bootstrap' |
| 87 | + echo ' make release' |
| 88 | + exit 1 |
72 | 89 |
|
73 | 90 | - name: Perform CodeQL Analysis
|
74 |
| - uses: github/codeql-action/analyze@v2 |
| 91 | + uses: github/codeql-action/analyze@v3 |
75 | 92 | with:
|
76 | 93 | category: "/language:${{matrix.language}}"
|
0 commit comments