|
1 | | -name: "CodeQL" |
| 1 | +name: "Code Scanning - Action" |
2 | 2 |
|
3 | 3 | on: |
4 | 4 | push: |
5 | | - branches: [ "master" ] |
| 5 | + branches: [master] |
6 | 6 | pull_request: |
7 | | - branches: [ "master" ] |
| 7 | + branches: [master] |
| 8 | + schedule: |
| 9 | + # ┌───────────── minute (0 - 59) |
| 10 | + # │ ┌───────────── hour (0 - 23) |
| 11 | + # │ │ ┌───────────── day of the month (1 - 31) |
| 12 | + # │ │ │ ┌───────────── month (1 - 12 or JAN-DEC) |
| 13 | + # │ │ │ │ ┌───────────── day of the week (0 - 6 or SUN-SAT) |
| 14 | + # │ │ │ │ │ |
| 15 | + # │ │ │ │ │ |
| 16 | + # │ │ │ │ │ |
| 17 | + # * * * * * |
| 18 | + - cron: '30 1 * * 0' |
8 | 19 |
|
9 | 20 | jobs: |
10 | | - analyze: |
11 | | - name: Analyze |
| 21 | + CodeQL-Build: |
| 22 | + # CodeQL runs on ubuntu-latest, windows-latest, and macos-latest |
12 | 23 | runs-on: ubuntu-latest |
| 24 | + |
13 | 25 | permissions: |
| 26 | + # required for all workflows |
| 27 | + security-events: write |
| 28 | + |
| 29 | + # only required for workflows in private repositories |
14 | 30 | actions: read |
15 | 31 | contents: read |
16 | | - security-events: write |
17 | 32 |
|
18 | | - strategy: |
19 | | - fail-fast: false |
20 | | - matrix: |
21 | | - language: [ 'cpp' ] |
22 | 33 | steps: |
23 | | - - name: Checkout repository |
24 | | - uses: actions/checkout@v3 |
25 | | - - name: Initialize CodeQL |
26 | | - uses: github/codeql-action/init@v2 |
27 | | - with: |
28 | | - languages: ${{ matrix.language }} |
29 | | - # If you wish to specify custom queries, you can do so here or in a config file. |
30 | | - # By default, queries listed here will override any specified in a config file. |
31 | | - # Prefix the list here with "+" to use these queries and those in the config file. |
32 | | - |
33 | | - # 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 |
34 | | - # queries: security-extended,security-and-quality |
35 | | - |
36 | | - # Autobuild attempts to build any compiled languages (C/C++, C#, Go, or Java). |
37 | | - # If this step fails, then you should remove it and run the build manually (see below) |
38 | | - - name: Autobuild |
39 | | - uses: github/codeql-action/autobuild@v2 |
40 | | - |
41 | | - # ℹ️ Command-line programs to run using the OS shell. |
42 | | - # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun |
43 | | - |
44 | | - # If the Autobuild fails above, remove it and uncomment the following three lines. |
45 | | - # modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance. |
46 | | - |
47 | | - # - run: | |
48 | | - # echo "Run, Build Application using script" |
49 | | - # ./location_of_script_within_repo/buildscript.sh |
50 | | - # |
51 | | - # In our case, this would be a CMake build step. |
52 | | - |
53 | | - - name: Perform CodeQL Analysis |
54 | | - uses: github/codeql-action/analyze@v2 |
55 | | - with: |
56 | | - category: "/language:${{matrix.language}}" |
| 34 | + - name: Checkout repository |
| 35 | + uses: actions/checkout@v3 |
| 36 | + |
| 37 | + # Initializes the CodeQL tools for scanning. |
| 38 | + - name: Initialize CodeQL |
| 39 | + uses: github/codeql-action/init@v2 |
| 40 | + # Override language selection by uncommenting this and choosing your languages |
| 41 | + with: |
| 42 | + languages: cpp |
| 43 | + |
| 44 | + # Autobuild attempts to build any compiled languages (C/C++, C#, Go, or Java). |
| 45 | + # If this step fails, then you should remove it and run the build manually (see below). |
| 46 | + - name: Autobuild |
| 47 | + uses: github/codeql-action/autobuild@v2 |
| 48 | + |
| 49 | + # ℹ️ Command-line programs to run using the OS shell. |
| 50 | + # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun |
| 51 | + |
| 52 | + # ✏️ If the Autobuild fails above, remove it and uncomment the following |
| 53 | + # three lines and modify them (or add more) to build your code if your |
| 54 | + # project uses a compiled language |
| 55 | + |
| 56 | + #- run: | |
| 57 | + # make bootstrap |
| 58 | + # make release |
| 59 | + |
| 60 | + - name: Perform CodeQL Analysis |
| 61 | + uses: github/codeql-action/analyze@v2 |
0 commit comments