| 1 |
name: Code Scan |
| 2 |
|
| 3 |
on: |
| 4 |
push: |
| 5 |
branches: |
| 6 |
- main |
| 7 |
- scan |
| 8 |
pull_request: |
| 9 |
branches: |
| 10 |
- main |
| 11 |
- scan |
| 12 |
|
| 13 |
jobs: |
| 14 |
scan: |
| 15 |
name: Scan Codebase via CodeQL |
| 16 |
runs-on: ubuntu-latest |
| 17 |
permissions: |
| 18 |
actions: read |
| 19 |
contents: read |
| 20 |
security-events: write |
| 21 |
|
| 22 |
strategy: |
| 23 |
fail-fast: false |
| 24 |
matrix: |
| 25 |
language: |
| 26 |
- cpp |
| 27 |
|
| 28 |
steps: |
| 29 |
- name: Install dependencies |
| 30 |
run: | |
| 31 |
sudo apt -y update |
| 32 |
sudo apt -y install dbus expat libaudit-dev libselinux-dev libsystemd-dev python3-pip |
| 33 |
sudo pip3 install meson ninja |
| 34 |
- name: Checkout repository |
| 35 |
uses: actions/checkout@v4 |
| 36 |
- name: Initialize CodeQL |
| 37 |
uses: github/codeql-action/init@v2 |
| 38 |
with: |
| 39 |
config-file: ./.github/codeql-config.yml |
| 40 |
languages: ${{ matrix.language }} |
| 41 |
- name: Automatically Build Project |
| 42 |
uses: github/codeql-action/autobuild@v2 |
| 43 |
- name: Perform CodeQL Analysis |
| 44 |
uses: github/codeql-action/analyze@v2 |