Skip to content

Commit f280704

Browse files
authored
Update codeql-analysis.yml
1 parent 149d252 commit f280704

File tree

1 file changed

+25
-47
lines changed

1 file changed

+25
-47
lines changed
Lines changed: 25 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,85 +1,63 @@
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-
#
121
name: "CodeQL"
132

143
on:
154
push:
16-
branches: [ master ]
5+
branches: [ "master", "main" ]
176
pull_request:
187
# The branches below must be a subset of the branches above
19-
branches: [ master ]
8+
branches: [ "master", "main" ]
209
schedule:
21-
- cron: '35 4 * * 3'
22-
permissions:
23-
contents: read
10+
- cron: '29 6 * * 5'
11+
2412
jobs:
2513
analyze:
2614
name: Analyze
2715
runs-on: ubuntu-latest
2816
permissions:
29-
actions: read-all
17+
actions: read
3018
contents: read
3119
security-events: write
3220

3321
strategy:
3422
fail-fast: false
3523
matrix:
3624
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
4027

4128
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-
4729
- 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
5331

5432
# Initializes the CodeQL tools for scanning.
5533
- name: Initialize CodeQL
56-
uses: github/codeql-action/init@231aa2c8a89117b126725a0e11897209b7118144 # v1.1.39
34+
uses: github/codeql-action/init@v4 # <--- UPDATED to v4
5735
with:
5836
languages: ${{ matrix.language }}
5937
# If you wish to specify custom queries, you can do so here or in a config file.
6038
# By default, queries listed here will override any specified in a config file.
6139
# 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
6340

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).
6546
# 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
6849

6950
# ℹ️ 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
7152

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.
7555

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
7959

80-
- run: |
81-
qmake KLog.pro
82-
make
83-
8460
- 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

Comments
 (0)