codeql.yml 3.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. # For most projects, this workflow file will not need changing; you simply need
  2. # to commit it to your repository.
  3. #
  4. # You may wish to alter this file to override the set of languages analyzed,
  5. # or to provide custom queries or build logic.
  6. #
  7. # ******** NOTE ********
  8. # We have attempted to detect the languages in your repository. Please check
  9. # the `language` matrix defined below to confirm you have the correct set of
  10. # supported CodeQL languages.
  11. #
  12. name: "CodeQL Advanced"
  13. on:
  14. push: # run if we update the workflow
  15. workflow_dispatch:
  16. schedule:
  17. - cron: '39 13 * * 4'
  18. jobs:
  19. analyze:
  20. name: Analyze (${{ matrix.language }})
  21. # Runner size impacts CodeQL analysis time. To learn more, please see:
  22. # - https://gh.io/recommended-hardware-resources-for-running-codeql
  23. # - https://gh.io/supported-runners-and-hardware-resources
  24. # - https://gh.io/using-larger-runners (GitHub.com only)
  25. # Consider using larger runners or machines with greater resources for possible analysis time improvements.
  26. runs-on: ubuntu-latest
  27. permissions:
  28. # required for all workflows
  29. security-events: write
  30. # required to fetch internal or private CodeQL packs
  31. packages: read
  32. # only required for workflows in private repositories
  33. actions: read
  34. contents: read
  35. strategy:
  36. fail-fast: false
  37. matrix:
  38. include:
  39. - language: actions
  40. build-mode: none
  41. # CodeQL supports the following values keywords for 'language': 'actions', 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift'
  42. # Use `c-cpp` to analyze code written in C, C++ or both
  43. # Use 'java-kotlin' to analyze code written in Java, Kotlin or both
  44. # Use 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both
  45. # To learn more about changing the languages that are analyzed or customizing the build mode for your analysis,
  46. # see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning.
  47. # If you are analyzing a compiled language, you can modify the 'build-mode' for that language to customize how
  48. # your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages
  49. steps:
  50. - name: Checkout repository
  51. uses: actions/checkout@v5
  52. # Add any setup steps before running the `github/codeql-action/init` action.
  53. # This includes steps like installing compilers or runtimes (`actions/setup-node`
  54. # or others). This is typically only required for manual builds.
  55. # - name: Setup runtime (example)
  56. # uses: actions/setup-example@v1
  57. # Initializes the CodeQL tools for scanning.
  58. - name: Initialize CodeQL
  59. uses: github/codeql-action/init@v3
  60. with:
  61. languages: ${{ matrix.language }}
  62. build-mode: ${{ matrix.build-mode }}
  63. # If you wish to specify custom queries, you can do so here or in a config file.
  64. # By default, queries listed here will override any specified in a config file.
  65. # Prefix the list here with "+" to use these queries and those in the config file.
  66. # 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
  67. queries: security-extended,security-and-quality
  68. - name: Perform CodeQL Analysis
  69. uses: github/codeql-action/analyze@v3
  70. with:
  71. category: "/language:${{matrix.language}}"