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