codeql.yml 2.9 KB

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