|
1 | | ---- |
| 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 | +# |
2 | 12 | name: "CodeQL" |
3 | 13 | on: |
| 14 | + push: |
| 15 | + branches: ["develop", "master"] |
4 | 16 | pull_request: |
5 | | - # The branches below must be a subset of the branches above |
6 | | - branches: [develop, master] |
| 17 | + branches: ["develop", "master"] |
7 | 18 | schedule: |
8 | | - - cron: '0 21 * * 0' |
| 19 | + - cron: '19 8 * * 5' |
9 | 20 | jobs: |
10 | 21 | analyze: |
11 | 22 | name: Analyze |
12 | | - runs-on: ubuntu-latest |
| 23 | + # Runner size impacts CodeQL analysis time. To learn more, please see: |
| 24 | + # - https://gh.io/recommended-hardware-resources-for-running-codeql |
| 25 | + # - https://gh.io/supported-runners-and-hardware-resources |
| 26 | + # - https://gh.io/using-larger-runners |
| 27 | + # Consider using larger runners for possible analysis time improvements. |
| 28 | + runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }} |
| 29 | + timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }} |
| 30 | + permissions: |
| 31 | + actions: read |
| 32 | + contents: read |
| 33 | + security-events: write |
13 | 34 | strategy: |
14 | 35 | fail-fast: false |
15 | 36 | matrix: |
16 | | - # Override automatic language detection by changing the below list |
17 | | - # Supported options are |
18 | | - # ['csharp', 'cpp', 'go', 'java', 'javascript', 'python'] |
19 | | - language: ['python'] |
20 | | - # Learn more... |
21 | | - # https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#overriding-automatic-language-detection |
| 37 | + language: ['javascript-typescript', 'python'] |
| 38 | + # CodeQL supports [ 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift' ] |
| 39 | + # Use only 'java-kotlin' to analyze code written in Java, Kotlin or both |
| 40 | + # Use only 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both |
| 41 | + # Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support |
22 | 42 | steps: |
23 | 43 | - name: Checkout repository |
24 | | - uses: actions/checkout@v3.5.0 |
| 44 | + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 |
| 45 | + - name: Set up Python |
| 46 | + uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0 |
| 47 | + if: matrix.language == 'python' |
25 | 48 | with: |
26 | | - # We must fetch at least the immediate parents so that if this is |
27 | | - # a pull request then we can checkout the head. |
28 | | - fetch-depth: 2 |
29 | | - # If this run was triggered by a pull request event, then checkout |
30 | | - # the head of the pull request instead of the merge commit. |
31 | | - - run: git checkout HEAD^2 |
32 | | - if: ${{ github.event_name == 'pull_request' }} |
| 49 | + python-version-file: .python-version |
| 50 | + cache: pipenv |
33 | 51 | # Initializes the CodeQL tools for scanning. |
34 | 52 | - name: Initialize CodeQL |
35 | | - uses: github/codeql-action/init@v2 |
| 53 | + uses: github/codeql-action/init@e675ced7a7522a761fc9c8eb26682c8b27c42b2b # v3.24.1 |
36 | 54 | with: |
37 | 55 | languages: ${{ matrix.language }} |
38 | | - # Autobuild attempts to build any compiled languages |
39 | | - # (C/C++, C#, or Java). |
40 | | - # If this step fails, |
41 | | - # then you should remove it and run the build manually (see below) |
| 56 | + # If you wish to specify custom queries, you can do so here or in a config file. |
| 57 | + # By default, queries listed here will override any specified in a config file. |
| 58 | + # Prefix the list here with "+" to use these queries and those in the config file. |
| 59 | + # Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift). |
| 60 | + # If this step fails, then you should remove it and run the build manually (see below) |
42 | 61 | - name: Autobuild |
43 | | - uses: github/codeql-action/autobuild@v2 |
44 | | - # ℹ️ Command-line programs to run using the OS shell. |
45 | | - # 📚 https://git.io/JvXDl |
| 62 | + # 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 |
| 63 | + # queries: security-extended,security-and-quality |
46 | 64 |
|
47 | | - # ✏️ If the Autobuild fails above, |
48 | | - # remove it and uncomment the following three lines |
49 | | - # and modify them (or add more) to build your code if your project |
50 | | - # uses a compiled language |
51 | | - |
52 | | - #- run: | |
53 | | - # make bootstrap |
54 | | - # make release |
| 65 | + uses: github/codeql-action/autobuild@e675ced7a7522a761fc9c8eb26682c8b27c42b2b # v3.24.1 |
| 66 | + # - run: | |
| 67 | + # echo "Run, Build Application using script" |
| 68 | + # ./location_of_script_within_repo/buildscript.sh |
55 | 69 | - name: Perform CodeQL Analysis |
56 | | - uses: github/codeql-action/analyze@v2 |
| 70 | + # ℹ️ Command-line programs to run using the OS shell. |
| 71 | + # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun |
57 | 72 |
|
| 73 | + # If the Autobuild fails above, remove it and uncomment the following three lines. |
| 74 | + # modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance. |
| 75 | + uses: github/codeql-action/analyze@e675ced7a7522a761fc9c8eb26682c8b27c42b2b # v3.24.1 |
| 76 | + with: |
| 77 | + category: "/language:${{matrix.language}}" |
58 | 78 | concurrency: |
59 | 79 | group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref }} |
60 | 80 | cancel-in-progress: true |
0 commit comments