Skip to content

Commit

Permalink
ci: add CodeQL GitHub Action
Browse files Browse the repository at this point in the history
Scan the master branch with a standard GitHub CodeQL action.

Signed-off-by: Christian Göttsche <[email protected]>
  • Loading branch information
cgzones committed Jul 21, 2022
1 parent ceafe57 commit c813f6a
Showing 1 changed file with 63 additions and 0 deletions.
63 changes: 63 additions & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: "CodeQL"

on:
push:
branches: [master]
pull_request:
branches: [master]

permissions:
contents: read

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
concurrency:
group: ${{ github.workflow }}-${{ matrix.language }}-${{ github.ref }}
cancel-in-progress: true
permissions:
actions: read
security-events: write

strategy:
fail-fast: false
matrix:
language: [ 'cpp', 'python' ]

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}

- name: Install dependencies
run: |
sudo apt-get update -qq
sudo apt-get install -qqy \
bison \
clang \
flex \
gawk \
gettext \
libaudit-dev \
libcap-dev \
libcap-ng-dev \
libcunit1-dev \
libdbus-glib-1-dev \
libpcre2-dev \
python3-dev \
python-dev \
ruby-dev \
swig \
xmlto
- run: make -j$(nproc) DESTDIR="$(pwd)/destdir" install
- if: ${{ matrix.language == 'python' }}
run: make -j$(nproc) DESTDIR="$(pwd)/destdir" install-pywrap

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2

0 comments on commit c813f6a

Please sign in to comment.