Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .github/workflows/gitleaks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Loading