codeql.yml 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. name: "CodeQL Advanced"
  2. on:
  3. push:
  4. branches: [ "main" ]
  5. pull_request:
  6. branches: [ "main" ]
  7. permissions:
  8. contents: read
  9. jobs:
  10. analyze:
  11. name: Analyze project
  12. runs-on: ubuntu-latest
  13. permissions:
  14. security-events: write
  15. packages: read
  16. actions: read
  17. strategy:
  18. fail-fast: false
  19. matrix:
  20. include:
  21. - language: go
  22. build-mode: autobuild
  23. - language: actions
  24. build-mode: none
  25. steps:
  26. - uses: step-security/harden-runner@95d9a5deda9de15063e7595e9719c11c38c90ae2 # v2.13.2
  27. with:
  28. egress-policy: audit
  29. - name: Checkout repository
  30. uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
  31. # Without this, codeql scan builds databases separately for all modules during every run.
  32. - name: Run go work
  33. run: make go-work
  34. # Initializes the CodeQL tools for scanning.
  35. - name: Initialize CodeQL
  36. uses: github/codeql-action/init@0499de31b99561a6d14a36a5f662c2a54f91beee # v3.29.5
  37. with:
  38. languages: ${{ matrix.language }}
  39. build-mode: ${{ matrix.build-mode }}
  40. config-file: ./.github/config/codeql-config.yaml
  41. - name: Perform CodeQL Analysis
  42. uses: github/codeql-action/analyze@0499de31b99561a6d14a36a5f662c2a54f91beee # v3.29.5