diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml index 26e1019..a53e538 100644 --- a/.github/workflows/pr.yaml +++ b/.github/workflows/pr.yaml @@ -12,6 +12,7 @@ on: pull_request: branches: - main +concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} cancel-in-progress: true - develop paths-ignore: - '**.md' @@ -19,6 +20,26 @@ on: - '.github/workflows/**' jobs: + # SECRETS SCAN: Detect leaked credentials before merge + # ============================================================================ + secrets-scan: + name: "Secrets Scan (gitleaks)" + runs-on: ubuntu-latest + if: github.repository != 'Chris-Wolfgang/repo-template' + steps: + - name: Checkout code + uses: actions/checkout@v4 + with: + ref: refs/pull/${{ github.event.pull_request.number }}/head + persist-credentials: false + fetch-depth: 0 + + - name: Run gitleaks + uses: gitleaks/gitleaks-action@v2 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + # ============================================================================ # ============================================================================ # STAGE 1: Linux - .NET Core/5+ Tests with Coverage Gate # ============================================================================