codeql.yml 2.5 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: [ main ]
  16. pull_request:
  17. paths:
  18. - '.github/workflows/codeql.yml'
  19. schedule:
  20. - cron: '0 19 * * 0'
  21. permissions:
  22. contents: read
  23. security-events: write
  24. jobs:
  25. analyze:
  26. name: Analyze
  27. runs-on: ubuntu-latest
  28. strategy:
  29. fail-fast: false
  30. matrix:
  31. language: [ 'go' ]
  32. # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
  33. # Learn more:
  34. # https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed
  35. steps:
  36. - name: Checkout repository
  37. uses: actions/checkout@v2
  38. with:
  39. # We must fetch at least the immediate parents so that if this is
  40. # a pull request then we can checkout the head.
  41. fetch-depth: 2
  42. # Initializes the CodeQL tools for scanning.
  43. - name: Initialize CodeQL
  44. uses: github/codeql-action/init@v1
  45. with:
  46. languages: ${{ matrix.language }}
  47. # If you wish to specify custom queries, you can do so here or in a config file.
  48. # By default, queries listed here will override any specified in a config file.
  49. # Prefix the list here with "+" to use these queries and those in the config file.
  50. # queries: ./path/to/local/query, your-org/your-repo/queries@main
  51. # Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
  52. # If this step fails, then you should remove it and run the build manually (see below)
  53. - name: Autobuild
  54. uses: github/codeql-action/autobuild@v1
  55. # ℹ️ Command-line programs to run using the OS shell.
  56. # 📚 https://git.io/JvXDl
  57. # ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
  58. # and modify them (or add more) to build your code if your project
  59. # uses a compiled language
  60. #- run: |
  61. # make bootstrap
  62. # make release
  63. - name: Perform CodeQL Analysis
  64. uses: github/codeql-action/analyze@v1