perf(ci): move slow pre-push hooks to CI and split into Lint/Security workflows #1
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Copyright 2026 Phillip Cloud | |
| # Licensed under the Apache License, Version 2.0 | |
| name: Security | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| permissions: | |
| contents: read | |
| jobs: | |
| nix-security: | |
| name: ${{ matrix.name }} | |
| runs-on: ubuntu-latest | |
| concurrency: | |
| group: security-${{ matrix.tool }}-${{ github.ref }} | |
| cancel-in-progress: ${{ github.event_name == 'pull_request' }} | |
| strategy: | |
| fail-fast: ${{ github.event_name == 'pull_request' }} | |
| matrix: | |
| include: | |
| - tool: govulncheck | |
| name: Vulnerability Check | |
| - tool: osv-scanner | |
| name: OSV Scan | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 | |
| with: | |
| persist-credentials: false | |
| - uses: cachix/install-nix-action@4e002c8ec80594ecd40e759629461e26c8abed15 # v31 | |
| - name: Run ${{ matrix.tool }} | |
| run: nix run '.#${{ matrix.tool }}' | |
| secrets: | |
| name: Secret Scan | |
| runs-on: ubuntu-latest | |
| concurrency: | |
| group: security-secrets-${{ github.ref }} | |
| cancel-in-progress: ${{ github.event_name == 'pull_request' }} | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 | |
| with: | |
| fetch-depth: 0 | |
| persist-credentials: false | |
| - uses: trufflesecurity/trufflehog@7635b24fd512a2e817dd3e9dd661caaf035a079d # v3.93.1 | |
| with: | |
| extra_args: --only-verified | |
| codeql: | |
| name: CodeQL (Go) | |
| runs-on: ubuntu-latest | |
| concurrency: | |
| group: security-codeql-${{ github.ref }} | |
| cancel-in-progress: ${{ github.event_name == 'pull_request' }} | |
| permissions: | |
| security-events: write | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 | |
| with: | |
| persist-credentials: false | |
| - name: Initialize CodeQL | |
| uses: github/codeql-action/init@9e907b5e64f6b83e7804b09294d44122997950d6 # v4.32.3 | |
| with: | |
| languages: go | |
| build-mode: none | |
| - name: Perform CodeQL analysis | |
| uses: github/codeql-action/analyze@9e907b5e64f6b83e7804b09294d44122997950d6 # v4.32.3 |