codeql.yml 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. name: "CodeQL"
  2. on:
  3. push:
  4. branches: [ 'master', 'gh-pages', 'release' ]
  5. pull_request:
  6. # The branches below must be a subset of the branches above
  7. branches: [ 'master' ]
  8. schedule:
  9. - cron: '59 11 * * 5'
  10. jobs:
  11. analyze:
  12. name: Analyze
  13. runs-on: ubuntu-latest
  14. permissions:
  15. actions: read
  16. contents: read
  17. security-events: write
  18. strategy:
  19. fail-fast: false
  20. matrix:
  21. language: [ 'python' ]
  22. # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
  23. # Use only 'java' to analyze code written in Java, Kotlin or both
  24. # Use only 'javascript' to analyze code written in JavaScript, TypeScript or both
  25. # Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
  26. steps:
  27. - name: Checkout repository
  28. uses: actions/checkout@v4
  29. # Initializes the CodeQL tools for scanning.
  30. - name: Initialize CodeQL
  31. uses: github/codeql-action/init@v2
  32. with:
  33. languages: ${{ matrix.language }}
  34. # If you wish to specify custom queries, you can do so here or in a config file.
  35. # By default, queries listed here will override any specified in a config file.
  36. # Prefix the list here with "+" to use these queries and those in the config file.
  37. # For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
  38. # queries: security-extended,security-and-quality
  39. # Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift).
  40. # If this step fails, then you should remove it and run the build manually (see below)
  41. - name: Autobuild
  42. uses: github/codeql-action/autobuild@v2
  43. # ℹ️ Command-line programs to run using the OS shell.
  44. # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
  45. # If the Autobuild fails above, remove it and uncomment the following three lines.
  46. # modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
  47. # - run: |
  48. # echo "Run, Build Application using script"
  49. # ./location_of_script_within_repo/buildscript.sh
  50. - name: Perform CodeQL Analysis
  51. uses: github/codeql-action/analyze@v2
  52. with:
  53. category: "/language:${{matrix.language}}"