1- name : " CodeQL"
1+ name : " CodeQL Advanced "
22
33on :
44 workflow_dispatch :
5+ push :
6+ branches : [ "main" ]
7+ pull_request :
8+ branches : [ "main" ]
59 schedule :
6- - cron : " 0 0 * * 1"
7-
8- permissions :
9- contents : read
10+ - cron : ' 33 1 * * 2'
1011
1112jobs :
1213 analyze :
13- name : Analyze
14+ name : Analyze (${{ matrix.language }})
15+ # Runner size impacts CodeQL analysis time. To learn more, please see:
16+ # - https://gh.io/recommended-hardware-resources-for-running-codeql
17+ # - https://gh.io/supported-runners-and-hardware-resources
18+ # - https://gh.io/using-larger-runners (GitHub.com only)
19+ # Consider using larger runners or machines with greater resources for possible analysis time improvements.
1420 runs-on : windows-latest
1521 permissions :
22+ packages : read
1623 actions : read
1724 contents : read
1825 security-events : write
1926
2027 strategy :
2128 fail-fast : false
2229 matrix :
23- language : ["cpp"]
24-
30+ include :
31+ - language : c-cpp
32+ build-mode : autobuild
2533 steps :
2634 - name : Harden Runner
2735 uses : step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1
@@ -32,17 +40,30 @@ jobs:
3240 uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
3341 with :
3442 submodules : ' recursive'
35-
43+
3644 # Initializes the CodeQL tools for scanning.
3745 - name : Initialize CodeQL
3846 uses : github/codeql-action/init@4f3212b61783c3c68e8309a0f18a699764811cda # v3.27.1
3947 with :
4048 languages : ${{ matrix.language }}
49+ build-mode : ${{ matrix.build-mode }}
50+ # If you wish to specify custom queries, you can do so here or in a config file.
51+ # By default, queries listed here will override any specified in a config file.
52+ # Prefix the list here with "+" to use these queries and those in the config file.
4153
42- - name : Autobuild
43- uses : github/codeql-action/autobuild@4f3212b61783c3c68e8309a0f18a699764811cda # v3.27.1
54+ # 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
55+ # queries: security-extended,security-and-quality
56+
57+ # - name: Autobuild
58+ # uses: github/codeql-action/autobuild@4f3212b61783c3c68e8309a0f18a699764811cda # v3.27.1
4459
4560 - name : Perform CodeQL Analysis
61+ id : analyze
4662 uses : github/codeql-action/analyze@4f3212b61783c3c68e8309a0f18a699764811cda # v3.27.1
4763 with :
48- category : " /language:${{matrix.language}}"
64+ category : " /language:${{matrix.language}}"
65+
66+ - name : Upload CodeQL Analysis Results
67+ uses : actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
68+ with :
69+ path : ${{ steps.analyze.outputs.sarif-output }}
0 commit comments