codeql-analysis.yml 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. name: "CodeQL"
  2. permissions:
  3. contents: read
  4. on:
  5. push:
  6. branches: [ main ]
  7. paths:
  8. - '**.js'
  9. - '**.go'
  10. - '!**_test.go'
  11. - '.github/workflows/codeql-analysis.yml'
  12. pull_request:
  13. # The branches below must be a subset of the branches above
  14. branches: [ main ]
  15. paths:
  16. - '**.js'
  17. - '**.go'
  18. - '!**_test.go'
  19. - '.github/workflows/codeql-analysis.yml'
  20. schedule:
  21. - cron: '45 22 * * 3'
  22. workflow_dispatch:
  23. jobs:
  24. analyze:
  25. name: Analyze (${{ matrix.language }})
  26. runs-on: ubuntu-latest
  27. permissions:
  28. actions: read
  29. contents: read
  30. security-events: write
  31. strategy:
  32. fail-fast: false
  33. matrix:
  34. language: [ 'go', 'javascript' ]
  35. steps:
  36. - name: Checkout repository
  37. uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
  38. with:
  39. persist-credentials: false
  40. - uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0
  41. if: matrix.language == 'go'
  42. with:
  43. go-version: stable
  44. - name: Initialize CodeQL
  45. uses: github/codeql-action/init@9b3254085494b55a0f7c4c2b3d2d52cc712ce370 # v4.39.1
  46. with:
  47. languages: ${{ matrix.language }}
  48. - name: Autobuild
  49. uses: github/codeql-action/autobuild@9b3254085494b55a0f7c4c2b3d2d52cc712ce370 # v4.39.1
  50. - name: Perform CodeQL Analysis
  51. uses: github/codeql-action/analyze@9b3254085494b55a0f7c4c2b3d2d52cc712ce370 # v4.39.1
  52. with:
  53. category: "/language:${{ matrix.language }}"