diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml new file mode 100644 index 0000000000..ab697d9bc5 --- /dev/null +++ b/.github/workflows/codeql.yml @@ -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 diff --git a/.lgtm.yml b/.lgtm.yml index 8f7a237c31..f89598ad41 100644 --- 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