codeql.yml 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. name: "CodeQL"
  2. on:
  3. push:
  4. branches: [ master ]
  5. pull_request:
  6. # The branches below must be a subset of the branches above
  7. branches: [ master ]
  8. schedule:
  9. - cron: '18 21 * * 1'
  10. jobs:
  11. analyze:
  12. name: Analyze
  13. runs-on: ubuntu-latest
  14. continue-on-error: true
  15. permissions:
  16. actions: read
  17. contents: read
  18. security-events: write
  19. strategy:
  20. fail-fast: false
  21. matrix:
  22. language: [ 'cpp', 'python' ]
  23. # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
  24. steps:
  25. - name: Checkout repository
  26. uses: actions/checkout@v3.1.0
  27. # Initializes the CodeQL tools for scanning.
  28. - name: Initialize CodeQL
  29. uses: github/codeql-action/init@v2
  30. with:
  31. languages: ${{ matrix.language }}
  32. - run: |
  33. sudo apt-get update
  34. sudo apt-get install libyaml-dev
  35. sudo apt-get install libssl-dev
  36. sudo apt-get install libpcre2-dev
  37. sudo apt-get install libjansson-dev
  38. sudo apt-get install libpcap-dev
  39. sudo apt-get install libnuma-dev
  40. git clone --depth 1 https://github.com/OISF/libhtp.git
  41. cargo install cbindgen
  42. export PATH=/opt/work/.cargo/bin:$PATH
  43. chmod +x autogen.sh
  44. ./autogen.sh
  45. ./configure
  46. make
  47. - name: Perform CodeQL Analysis
  48. uses: github/codeql-action/analyze@v2