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