]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
ci: adds CodeQL workflow and LGTM support 7471/head
authorBACK Yonah <yonah.back@telecomnancy.eu>
Mon, 28 Mar 2022 17:10:48 +0000 (19:10 +0200)
committerPhilippe Antoine <contact@catenacyber.fr>
Fri, 3 Jun 2022 08:50:30 +0000 (10:50 +0200)
Ticket: #5307

.github/workflows/codeql.yml [new file with mode: 0644]
.lgtm.yml

diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml
new file mode 100644 (file)
index 0000000..ab697d9
--- /dev/null
@@ -0,0 +1,55 @@
+name: "CodeQL"
+
+on:
+  push:
+    branches: [ master ]
+  pull_request:
+    # The branches below must be a subset of the branches above
+    branches: [ master ]
+  schedule:
+    - cron: '18 21 * * 1'
+
+jobs:
+  analyze:
+    name: Analyze
+    runs-on: ubuntu-latest
+    continue-on-error: true
+    permissions:
+      actions: read
+      contents: read
+      packages: write
+      security-events: write
+
+
+    strategy:
+      fail-fast: false
+      matrix:
+        language: [ 'cpp', 'python' ]
+        # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
+    steps:
+    - name: Checkout repository
+      uses: actions/checkout@v2
+
+    # Initializes the CodeQL tools for scanning.
+    - name: Initialize CodeQL
+      uses: github/codeql-action/init@v1
+      with:
+        languages: ${{ matrix.language }}
+
+    - run: |
+       sudo apt-get update
+       sudo apt-get install libyaml-dev
+       sudo apt-get install libssl-dev
+       sudo apt-get install libpcre2-dev
+       sudo apt-get install libjansson-dev
+       sudo apt-get install libpcap-dev
+       sudo apt-get install libnuma-dev
+       git clone --depth 1 https://github.com/OISF/libhtp.git
+       cargo install cbindgen
+       export PATH=/opt/work/.cargo/bin:$PATH
+        chmod +x autogen.sh
+       ./autogen.sh
+       ./configure
+       make
+    - name: Perform CodeQL Analysis
+      uses: github/codeql-action/analyze@v1
index 8f7a237c31a17f2db073f66ab0f1516771cbe933..f89598ad4157025cddbe073eb57d5e1e7214932e 100644 (file)
--- a/.lgtm.yml
+++ b/.lgtm.yml
@@ -3,7 +3,18 @@ extraction:
     prepare:
       packages:
         - cargo
+        - libssl-dev
+        - rustc
+        - libpcre2-dev
+        - libyaml-dev
+        - libjansson-dev
+        - libnuma-dev
+        - libpcap-dev
     after_prepare:
       - git clone --depth 1 https://github.com/OISF/libhtp.git
       - cargo install cbindgen
       - export PATH=/opt/work/.cargo/bin:$PATH
+      - chmod +x autogen.sh
+      - ./autogen.sh
+      - ./configure
+      - make
\ No newline at end of file