Skip to content

Run gitleaks directly; the action breaks on a root commit's first push - #10

Merged
reesebuilt merged 1 commit into
mainfrom
fix-gitleaks-root-push
Aug 5, 2026
Merged

Run gitleaks directly; the action breaks on a root commit's first push#10
reesebuilt merged 1 commit into
mainfrom
fix-gitleaks-root-push

Conversation

@reesebuilt

Copy link
Copy Markdown
Owner

gitleaks-action computes its scan range as <oldest>^..<newest> from the push event. On a repository's first push the oldest commit is the root, whose parent does not exist, and the scan fails with unknown revision before reading a byte.

Replaced with the gitleaks binary over full history (checkout already fetches depth 0). Verified locally: 2 commits scanned, no leaks.

gitleaks-action computes its scan range as <oldest>^..<newest> from the push event.
On a repository's first push the oldest commit is the root, whose parent does not
exist, and the scan fails with 'unknown revision' before reading a byte. The failure
presents as a red check, not as a leak, so it erodes trust in the green one.

Replaced with the gitleaks binary over full history (the checkout already fetches
depth 0). Verified locally against this tree: 2 commits scanned, no leaks.
@reesebuilt
reesebuilt merged commit 228b0e9 into main Aug 5, 2026
1 check passed
@reesebuilt
reesebuilt deleted the fix-gitleaks-root-push branch August 5, 2026 00:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant