|
1 |
| -name: "CodeQL" |
| 1 | +name: CodeQL |
2 | 2 |
|
3 | 3 | on:
|
4 | 4 | push:
|
@@ -26,52 +26,46 @@ jobs:
|
26 | 26 | actions: read # for github/codeql-action/init to get workflow details
|
27 | 27 | contents: read # for actions/checkout to fetch code
|
28 | 28 | security-events: write # for github/codeql-action/autobuild to send a status report
|
| 29 | + packages: read # required to fetch internal or private CodeQL packs |
29 | 30 |
|
30 | 31 | strategy:
|
31 | 32 | fail-fast: false
|
32 | 33 | matrix:
|
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 |
| 34 | + include: |
| 35 | + - language: go |
| 36 | + build-mode: autobuild |
| 37 | + # CodeQL supports the following values keywords for 'language': 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift' |
| 38 | + # Use `c-cpp` to analyze code written in C, C++ or both |
| 39 | + # Use 'java-kotlin' to analyze code written in Java, Kotlin or both |
| 40 | + # Use 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both |
| 41 | + # To learn more about changing the languages that are analyzed or customizing the build mode for your analysis, |
| 42 | + # see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning. |
| 43 | + # If you are analyzing a compiled language, you can modify the 'build-mode' for that language to customize how |
| 44 | + # 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 |
38 | 45 |
|
39 | 46 | steps:
|
40 | 47 | - name: Checkout repository
|
41 | 48 | uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
|
42 | 49 |
|
| 50 | + - name: Setup Golang Environment |
| 51 | + uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1 |
| 52 | + with: |
| 53 | + go-version: stable |
| 54 | + if: matrix.language == 'go' |
| 55 | + |
43 | 56 | # Initializes the CodeQL tools for scanning.
|
44 | 57 | - name: Initialize CodeQL
|
45 | 58 | uses: github/codeql-action/init@b611370bb5703a7efb587f9d136a52ea24c5c38c # v3.25.11
|
46 | 59 | with:
|
47 | 60 | languages: ${{ matrix.language }}
|
| 61 | + build-mode: ${{ matrix.build-mode }} |
48 | 62 | # If you wish to specify custom queries, you can do so here or in a config file.
|
49 | 63 | # By default, queries listed here will override any specified in a config file.
|
50 | 64 | # Prefix the list here with "+" to use these queries and those in the config file.
|
51 | 65 |
|
52 | 66 | # 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 | 67 | # queries: security-extended,security-and-quality
|
54 | 68 |
|
55 |
| - - name: Setup Golang Environment |
56 |
| - uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1 |
57 |
| - with: |
58 |
| - go-version: stable |
59 |
| - |
60 |
| - # Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift). |
61 |
| - # If this step fails, then you should remove it and run the build manually (see below) |
62 |
| - - name: Autobuild |
63 |
| - uses: github/codeql-action/autobuild@b611370bb5703a7efb587f9d136a52ea24c5c38c # v3.25.11 |
64 |
| - |
65 |
| - # ℹ️ Command-line programs to run using the OS shell. |
66 |
| - # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun |
67 |
| - |
68 |
| - # If the Autobuild fails above, remove it and uncomment the following three lines. |
69 |
| - # modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance. |
70 |
| - |
71 |
| - # - run: | |
72 |
| - # echo "Run, Build Application using script" |
73 |
| - # ./location_of_script_within_repo/buildscript.sh |
74 |
| - |
75 | 69 | - name: Perform CodeQL Analysis
|
76 | 70 | uses: github/codeql-action/analyze@b611370bb5703a7efb587f9d136a52ea24c5c38c # v3.25.11
|
77 | 71 | with:
|
|
0 commit comments