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