codeql-analysis.yml 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  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. pull_request:
  16. # The branches below must be a subset of the branches above
  17. branches: [master]
  18. schedule:
  19. - cron: '0 15 * * 5'
  20. permissions:
  21. contents: read
  22. jobs:
  23. analyze:
  24. name: Analyze
  25. runs-on: ubuntu-latest
  26. permissions:
  27. actions: read
  28. contents: read
  29. security-events: write
  30. strategy:
  31. fail-fast: false
  32. matrix:
  33. language: [ 'go' ]
  34. steps:
  35. - name: Harden Runner
  36. uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
  37. with:
  38. egress-policy: audit
  39. - name: Checkout repository
  40. uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
  41. # Initializes the CodeQL tools for scanning.
  42. - name: Initialize CodeQL
  43. uses: github/codeql-action/init@28deaeda66b76a05916b6923827895f2b14ab387 # v3.28.16
  44. with:
  45. languages: ${{ matrix.language }}
  46. # If you wish to specify custom queries, you can do so here or in a config file.
  47. # By default, queries listed here will override any specified in a config file.
  48. # Prefix the list here with "+" to use these queries and those in the config file.
  49. # queries: ./path/to/local/query, your-org/your-repo/queries@main
  50. # Autobuild attempts to build any compiled languages (C/C++, C#, 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@28deaeda66b76a05916b6923827895f2b14ab387 # v3.28.16
  54. # ℹ️ Command-line programs to run using the OS shell.
  55. # 📚 https://git.io/JvXDl
  56. # ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
  57. # and modify them (or add more) to build your code if your project
  58. # uses a compiled language
  59. #- run: |
  60. # make bootstrap
  61. # make release
  62. - name: Perform CodeQL Analysis
  63. uses: github/codeql-action/analyze@28deaeda66b76a05916b6923827895f2b14ab387 # v3.28.16