Skip to content

Commit 263dc92

Browse files
committed
ci: use CodeQL instead of LGTM
As LGTM is going to be shut down by EOY[0], let's move the code scanning to CodeQL as recommended. Thanks to GH integration the results from such scans will be shown both in the respective PR and in the Security -> Code Scanning tab[1]. [0] https://github.blog/2022-08-15-the-next-step-for-lgtm-com-github-code-scanning/ [1] https://github.com/systemd/python-systemd/security/code-scanning
1 parent 661ee27 commit 263dc92

File tree

1 file changed

+53
-0
lines changed

1 file changed

+53
-0
lines changed

.github/workflows/codeql.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
---
2+
# vi: ts=2 sw=2 et:
3+
# SPDX-License-Identifier: LGPL-2.1-or-later
4+
#
5+
name: "CodeQL"
6+
7+
on:
8+
push:
9+
branches:
10+
- main
11+
pull_request:
12+
branches:
13+
- main
14+
15+
permissions:
16+
contents: read
17+
18+
jobs:
19+
analyze:
20+
name: Analyze
21+
runs-on: ubuntu-22.04
22+
concurrency:
23+
group: ${{ github.workflow }}-${{ matrix.language }}-${{ github.ref }}
24+
cancel-in-progress: true
25+
permissions:
26+
actions: read
27+
security-events: write
28+
29+
strategy:
30+
fail-fast: false
31+
matrix:
32+
language: ['cpp', 'python']
33+
34+
steps:
35+
- name: Checkout repository
36+
uses: actions/checkout@v3
37+
38+
- name: Initialize CodeQL
39+
uses: github/codeql-action/init@v2
40+
with:
41+
languages: ${{ matrix.language }}
42+
queries: +security-extended,security-and-quality
43+
44+
- name: Install dependencies
45+
run: |
46+
sudo apt -y update
47+
sudo apt -y install gcc libsystemd-dev
48+
49+
- name: Autobuild
50+
uses: github/codeql-action/autobuild@v2
51+
52+
- name: Perform CodeQL Analysis
53+
uses: github/codeql-action/analyze@v2

0 commit comments

Comments
 (0)