codeql.yml 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. name: "CodeQL"
  2. on:
  3. schedule:
  4. - cron: "30 0 * * *"
  5. # Allows you to run this workflow manually from the Actions tab
  6. workflow_dispatch:
  7. jobs:
  8. analyze:
  9. name: Analyze
  10. runs-on: ubuntu-latest
  11. permissions:
  12. actions: read
  13. contents: read
  14. security-events: write
  15. strategy:
  16. fail-fast: false
  17. matrix:
  18. language: [ javascript, cpp, python ]
  19. steps:
  20. - name: Checkout
  21. uses: actions/checkout@v4
  22. with:
  23. submodules: recursive
  24. - name: Install Packages (cpp)
  25. if: ${{ matrix.language == 'cpp' }}
  26. run: |
  27. sudo apt-get update
  28. sudo apt-get install --yes bison default-libmysqlclient-dev flex libcurl4-openssl-dev libjansson-dev libhiredis-dev libevent-dev liblua5.1-0-dev libpcre3-dev libncurses5-dev libpq-dev libreadline-dev libssl-dev libunistring-dev libmicrohttpd-dev libxml2-dev pkg-config python3 python3-dev uuid-dev zlib1g-dev
  29. sudo apt-get clean
  30. - name: Configure (cpp)
  31. if: ${{ matrix.language == 'cpp' }}
  32. run: make include_modules='app_lua app_python3 cnxcc db_mysql db_postgres db_redis dialplan http_client jansson lcr ndb_redis presence presence_xml presence_dialoginfo pua pua_dialoginfo topos_redis uuid websocket xmlops' cfg
  33. - name: After Prepare (cpp)
  34. if: ${{ matrix.language == 'cpp' }}
  35. run: export PKG_CONFIG_PATH=$RUNNER_TEMP/usr/lib/pkgconfig:$PKG_CONFIG_PATH && echo "PKG_CONFIG_PATH=$PKG_CONFIG_PATH" >> $GITHUB_ENV
  36. - name: Initialize CodeQL
  37. uses: github/codeql-action/init@v3
  38. with:
  39. languages: ${{ matrix.language }}
  40. queries: +security-and-quality
  41. - name: Autobuild
  42. uses: github/codeql-action/autobuild@v3
  43. if: ${{ matrix.language == 'javascript' || matrix.language == 'python' }}
  44. - name: Build cpp
  45. if: ${{ matrix.language == 'cpp' }}
  46. run: make all
  47. - name: Perform CodeQL Analysis
  48. uses: github/codeql-action/analyze@v3
  49. with:
  50. category: "/language:${{ matrix.language }}"