Skip to content

ci(security): scan full history on push for TruffleHog#84

Merged
WhiteMuush merged 1 commit into
mainfrom
fix/ci-trufflehog-base
Jun 22, 2026
Merged

ci(security): scan full history on push for TruffleHog#84
WhiteMuush merged 1 commit into
mainfrom
fix/ci-trufflehog-base

Conversation

@WhiteMuush

Copy link
Copy Markdown
Owner

Problem

The TruffleHog secret-scan step fails with:

Error: BASE and HEAD commits are the same. TruffleHog won't scan anything.

github.event.before equals HEAD on branch creation and no-op pushes, so the
base..HEAD diff is empty and the action errors out.

Fix

  • On pull_request: diff against the default branch (unchanged behavior).
  • On push: leave base empty so TruffleHog scans the full git history from
    HEAD (fetch-depth: 0 already provides it). No more empty base..HEAD diff.

🤖 Generated with Claude Code

github.event.before equals HEAD on branch creation and no-op pushes, which
makes the TruffleHog action fail with 'BASE and HEAD commits are the same'.
Diff against the default branch only on pull_request; on push scan the full
git history from HEAD instead.
@WhiteMuush WhiteMuush merged commit 512246a into main Jun 22, 2026
11 checks passed
@WhiteMuush WhiteMuush deleted the fix/ci-trufflehog-base branch June 22, 2026 14:21
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