aboutsummaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
authorAlvaro Muñoz <pwntester@github.com>2022-12-02 13:06:54 +0100
committerGitHub <noreply@github.com>2022-12-02 13:06:54 +0100
commite49fe32f775c3f4cc5c833fff533529f18268f3f (patch)
treebb1c88431248767ad9f84df593cc946866434537 /.github
parentb2a1bf413b67da674d8199efde6b97b8e7fd5c42 (diff)
Add CodeQL workflow (#1815)
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/codeql.yml59
1 files changed, 59 insertions, 0 deletions
diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml
new file mode 100644
index 000000000..23f399887
--- /dev/null
+++ b/.github/workflows/codeql.yml
@@ -0,0 +1,59 @@
+name: "CodeQL"
+
+on:
+ push:
+ branches: [ 'dev' ]
+ pull_request:
+ # The branches below must be a subset of the branches above
+ branches: [ 'dev' ]
+ schedule:
+ - cron: '25 19 * * 2'
+
+jobs:
+ analyze:
+ name: Analyze
+ runs-on: ubuntu-latest
+ env:
+ GO111MODULE: on
+ CFLAGS: -Werror
+ permissions:
+ actions: read
+ contents: read
+ security-events: write
+
+ strategy:
+ fail-fast: false
+ matrix:
+ language: [ 'cpp', 'python', 'ruby' ]
+
+ steps:
+ - uses: actions/checkout@v3
+ with:
+ fetch-depth: 0
+ - name: Install Ubuntu Prerequisites
+ run: |
+ sudo add-apt-repository ppa:longsleep/golang-backports
+ sudo apt-get update
+ sudo apt-get install -y libunwind-dev
+ sudo apt-get install autoconf automake libtool pkg-config gettext flex bison libpcap-dev
+ sudo apt-get install golang-1.16-go libgoogle-perftools-dev graphviz
+ go install github.com/google/pprof@latest
+ sudo ln -s ${HOME}/go/bin/pprof /usr/bin/pprof
+ pprof -h
+ - name: Configure nDPI library
+ run: |
+ ./autogen.sh --enable-gprof --enable-option-checking=fatal --with-pcre --with-maxminddb --enable-tls-sigs
+
+ - name: Initialize CodeQL
+ uses: github/codeql-action/init@v2
+ with:
+ languages: ${{ matrix.language }}
+
+ - name: Build nDPI library
+ run: |
+ make
+
+ - name: Perform CodeQL Analysis
+ uses: github/codeql-action/analyze@v2
+ with:
+ category: "/language:${{matrix.language}}"