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