Skip to content

Commit c01b472

Browse files
committed
Add Github Actions workflow for CodeQL analysis
This workflow will also run on the 20th of every month in case future improvements to CodeQL can discover new vulnerabilities.
1 parent 67e9424 commit c01b472

File tree

1 file changed

+56
-0
lines changed

1 file changed

+56
-0
lines changed

.github/workflows/codeql.yaml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
##############################################################################
2+
# Copyright 2025 Leon Lynch
3+
#
4+
# This file is licensed under the terms of the LGPL v2.1 license.
5+
# See LICENSE file.
6+
##############################################################################
7+
8+
name: CodeQL
9+
10+
on:
11+
push:
12+
pull_request:
13+
branches: [ "master" ]
14+
schedule:
15+
- cron: '15 4 20 * *'
16+
17+
jobs:
18+
analyze:
19+
name: Analyze
20+
runs-on: ubuntu-latest
21+
timeout-minutes: 360
22+
permissions:
23+
security-events: write
24+
packages: read
25+
actions: read
26+
contents: read
27+
28+
steps:
29+
- name: Checkout
30+
uses: actions/checkout@v4
31+
with:
32+
submodules: recursive
33+
34+
- name: Install dependencies
35+
run: |
36+
sudo apt-get update
37+
sudo apt-get install -y libmbedtls-dev libboost-locale-dev iso-codes libjson-c-dev libpcsclite-dev qtbase5-dev
38+
39+
- name: Initialize CodeQL
40+
uses: github/codeql-action/init@v4
41+
with:
42+
languages: c-cpp
43+
build-mode: manual
44+
queries: security-and-quality
45+
46+
- name: Build
47+
run: |
48+
cmake -B build \
49+
-DCMAKE_BUILD_TYPE="Debug" \
50+
-DBUILD_EMV_DECODE=YES \
51+
-DBUILD_EMV_TOOL=YES \
52+
-DBUILD_EMV_VIEWER=YES
53+
cmake --build build -j 4
54+
55+
- name: Perform CodeQL Analysis
56+
uses: github/codeql-action/analyze@v4

0 commit comments

Comments
 (0)