diff --git a/.github/workflows/gitleaks.yml b/.github/workflows/gitleaks.yml index bd5f7bd..40f0b40 100644 --- a/.github/workflows/gitleaks.yml +++ b/.github/workflows/gitleaks.yml @@ -5,12 +5,16 @@ on: full_history: type: boolean default: false + use_blacksmith: + description: Use the organization's approved Blacksmith Ubuntu runner + type: boolean + default: false permissions: contents: read jobs: scan: name: gitleaks - runs-on: ubuntu-latest + runs-on: ${{ inputs.use_blacksmith && 'blacksmith-4vcpu-ubuntu-2404' || 'ubuntu-latest' }} timeout-minutes: 20 steps: - name: Fetch Git history without checking out files diff --git a/README.md b/README.md index 08de90c..151786a 100644 --- a/README.md +++ b/README.md @@ -21,6 +21,13 @@ jobs: full_history: ${{ github.event_name != 'pull_request' && github.event_name != 'merge_group' }} ``` +The default runner remains GitHub-hosted `ubuntu-latest`. Repositories already +enabled for the organization's Blacksmith runners can pass `use_blacksmith: true` +alongside `full_history` to use `blacksmith-4vcpu-ubuntu-2404`. This changes only +where the same scan runs; its rules, history range, redaction, failure handling +and required `secrets / gitleaks` check remain unchanged. The boolean option +selects between these two labels rather than accepting arbitrary runner labels. + The job named `secrets / gitleaks` must pass on pull requests. PR scans cover commits between the base and head, including credentials added and subsequently removed in that range. Merge commits are diffed against their first parent, including credentials introduced only while resolving a conflict. Scheduled and manual runs scan every fetched branch and tag, including deleted files in reachable history. Unreachable or server-only objects are outside the scan. The workflow fetches Git objects without checking out files or initializing submodules. Broken submodule metadata cannot disable the scan, and caller code is never executed. Git LFS object contents are outside this Git-object scan.