name: "CodeQL" permissions: contents: read on: push: branches: [ main ] paths: - '**.js' - '**.go' - '!**_test.go' - '.github/workflows/codeql-analysis.yml' pull_request: # The branches below must be a subset of the branches above branches: [ main ] paths: - '**.js' - '**.go' - '!**_test.go' - '.github/workflows/codeql-analysis.yml' schedule: - cron: '45 22 * * 3' workflow_dispatch: jobs: analyze: name: Analyze (${{ matrix.language }}) runs-on: ubuntu-latest permissions: actions: read contents: read security-events: write strategy: fail-fast: false matrix: language: [ 'go', 'javascript' ] steps: - name: Checkout repository uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: persist-credentials: false - uses: actions/setup-go@d8cbb8045d7f43706b9177cceb36c1f91a6644d5 # v7.1.0 if: matrix.language == 'go' with: go-version: stable - name: Initialize CodeQL uses: github/codeql-action/init@915412ff23e8b7659517e607487dbeae018f2934 # v4.39.5 with: languages: ${{ matrix.language }} - name: Autobuild uses: github/codeql-action/autobuild@915412ff23e8b7659517e607487dbeae018f2934 # v4.39.5 - name: Perform CodeQL Analysis uses: github/codeql-action/analyze@915412ff23e8b7659517e607487dbeae018f2934 # v4.39.5 with: category: "/language:${{ matrix.language }}"