|
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: [ master ] |
| 5 | + branches: [ "master", "main" ] |
17 | 6 | pull_request: |
18 | 7 | # The branches below must be a subset of the branches above |
19 | | - branches: [ master ] |
| 8 | + branches: [ "master", "main" ] |
20 | 9 | schedule: |
21 | | - - cron: '35 4 * * 3' |
22 | | -permissions: |
23 | | - contents: read |
| 10 | + - cron: '29 6 * * 5' |
| 11 | + |
24 | 12 | jobs: |
25 | 13 | analyze: |
26 | 14 | name: Analyze |
27 | 15 | runs-on: ubuntu-latest |
28 | 16 | permissions: |
29 | | - actions: read-all |
| 17 | + actions: read |
30 | 18 | contents: read |
31 | 19 | security-events: write |
32 | 20 |
|
33 | 21 | strategy: |
34 | 22 | fail-fast: false |
35 | 23 | matrix: |
36 | 24 | language: [ 'cpp' ] |
37 | | - # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ] |
38 | | - # Learn more: |
39 | | - # 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 |
| 25 | + # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ] |
| 26 | + # Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support |
40 | 27 |
|
41 | 28 | steps: |
42 | | - - name: Harden the runner (Audit all outbound calls) |
43 | | - uses: step-security/harden-runner@e3f713f2d8f53843e71c69a996d56f51aa9adfb9 # v2.14.1 |
44 | | - with: |
45 | | - egress-policy: audit |
46 | | - |
47 | 29 | - name: Checkout repository |
48 | | - uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # v2.7.0 |
49 | | - - name: Install KLog dependencies |
50 | | - run: |
51 | | - sudo apt-get install ake qmake6 qt6-base-dev qt6-declarative-dev libhamlib-dev build-essential libgl1-mesa-dev qt6-serialport-dev qt6-positioning-dev qt6-charts-dev qt6-l10n-tools |
52 | | - |
| 30 | + uses: actions/checkout@v4 # Ensure this is v4 as well |
53 | 31 |
|
54 | 32 | # Initializes the CodeQL tools for scanning. |
55 | 33 | - name: Initialize CodeQL |
56 | | - uses: github/codeql-action/init@231aa2c8a89117b126725a0e11897209b7118144 # v1.1.39 |
| 34 | + uses: github/codeql-action/init@v4 # <--- UPDATED to v4 |
57 | 35 | with: |
58 | 36 | languages: ${{ matrix.language }} |
59 | 37 | # If you wish to specify custom queries, you can do so here or in a config file. |
60 | 38 | # By default, queries listed here will override any specified in a config file. |
61 | 39 | # Prefix the list here with "+" to use these queries and those in the config file. |
62 | | - # queries: ./path/to/local/query, your-org/your-repo/queries@main |
63 | 40 |
|
64 | | - # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). |
| 41 | + # 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 |
| 42 | + # queries: security-extended,security-and-quality |
| 43 | + |
| 44 | + |
| 45 | + # Autobuild attempts to build any compiled languages (C/C++, C#, Go, or Java). |
65 | 46 | # If this step fails, then you should remove it and run the build manually (see below) |
66 | | - #- name: Autobuild |
67 | | - # uses: github/codeql-action/autobuild@v1 |
| 47 | + - name: Autobuild |
| 48 | + uses: github/codeql-action/autobuild@v4 # <--- UPDATED to v4 |
68 | 49 |
|
69 | 50 | # ℹ️ Command-line programs to run using the OS shell. |
70 | | - # 📚 https://git.io/JvXDl |
| 51 | + # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun |
71 | 52 |
|
72 | | - # ✏️ If the Autobuild fails above, remove it and uncomment the following three lines |
73 | | - # and modify them (or add more) to build your code if your project |
74 | | - # uses a compiled language |
| 53 | + # If the Autobuild fails above, remove it and uncomment the following three lines. |
| 54 | + # modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance. |
75 | 55 |
|
76 | | - #- run: | |
77 | | - # make bootstrap |
78 | | - # make release |
| 56 | + # - run: | |
| 57 | + # echo "Run, Build Application using script" |
| 58 | + # ./location_of_script_within_repo/buildscript.sh |
79 | 59 |
|
80 | | - - run: | |
81 | | - qmake KLog.pro |
82 | | - make |
83 | | - |
84 | 60 | - name: Perform CodeQL Analysis |
85 | | - uses: github/codeql-action/analyze@231aa2c8a89117b126725a0e11897209b7118144 # v1.1.39 |
| 61 | + uses: github/codeql-action/analyze@v4 # <--- UPDATED to v4 |
| 62 | + with: |
| 63 | + category: "/language:${{matrix.language}}" |
0 commit comments