codeql.yml 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. name: codeql
  2. on:
  3. push:
  4. branches:
  5. - 'main'
  6. paths-ignore:
  7. - '**/*.md'
  8. - '**/*.txt'
  9. - '**/*.yaml'
  10. - '**/*_test.go'
  11. pull_request:
  12. branches:
  13. - 'main'
  14. paths-ignore:
  15. - '**/*.md'
  16. - '**/*.txt'
  17. - '**/*.yaml'
  18. - '**/*_test.go'
  19. jobs:
  20. analyze:
  21. name: Analyze
  22. runs-on: 'ubuntu-latest'
  23. permissions:
  24. actions: read
  25. contents: read
  26. security-events: write
  27. strategy:
  28. fail-fast: false
  29. matrix:
  30. language:
  31. - go
  32. steps:
  33. -
  34. name: Checkout
  35. uses: actions/checkout@v4
  36. -
  37. name: Set up Go
  38. uses: actions/setup-go@v4
  39. with:
  40. go-version-file: go.mod
  41. check-latest: true
  42. -
  43. name: Initialize CodeQL
  44. uses: github/codeql-action/init@v2
  45. with:
  46. languages: ${{ matrix.language }}
  47. -
  48. name: Autobuild
  49. uses: github/codeql-action/autobuild@v2
  50. -
  51. name: Perform CodeQL Analysis
  52. uses: github/codeql-action/analyze@v2
  53. with:
  54. category: "/language:${{matrix.language}}"