name: Code Scanning on: push: branches: - main pull_request: branches: - main schedule: - cron: "0 0 * * 0" workflow_dispatch: permissions: contents: read jobs: CodeQL-Build: permissions: actions: read # for github/codeql-action/init to get workflow details contents: read # for actions/checkout to fetch code security-events: write # for github/codeql-action/analyze to upload SARIF results runs-on: ubuntu-latest if: ${{ !contains(github.event.pull_request.labels.*.name, 'skip-ci') }} steps: - name: Harden Runner uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2 with: egress-policy: audit - name: Check out code uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0 - name: setup go uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0 with: go-version-file: "go.mod" cache: true - name: Initialize CodeQL uses: github/codeql-action/init@461ef6c76dfe95d5c364de2f431ddbd31a417628 # v3.26.9 with: languages: go - name: Perform CodeQL Analysis uses: github/codeql-action/analyze@461ef6c76dfe95d5c364de2f431ddbd31a417628 # v3.26.9