Skip to content

ci: bound TruffleHog scans on branch pushes - #14425

Open
rathodkunj2005 wants to merge 1 commit into
huggingface:mainfrom
rathodkunj2005:fix-trufflehog-new-branch-base-20260808
Open

ci: bound TruffleHog scans on branch pushes#14425
rathodkunj2005 wants to merge 1 commit into
huggingface:mainfrom
rathodkunj2005:fix-trufflehog-new-branch-base-20260808

Conversation

@rathodkunj2005

Copy link
Copy Markdown

What this changes

Fixes #14376 by passing an explicit base and head to the TruffleHog action.

On new-branch push events, github.event.before is all zeros, so the action falls back to an empty base and scans the repository's full history. This makes new branches fail on legacy findings that are already present on main. Bounding the scan against the default branch keeps the current --results=verified,unknown behavior while scanning only the branch diff.

Verification

$ git diff --check origin/main...HEAD
# no output

$ go run github.com/rhysd/actionlint/cmd/actionlint@latest -color=false .github/workflows/trufflehog.yml
# no output

$ gh run watch 31270994941 --repo rathodkunj2005/diffusers --exit-status
✓ fix-trufflehog-new-branch-base-20260808 Secret Leaks · 31270994941
✓ trufflehog in 27s
  ✓ Set up job
  ✓ Checkout code
  ✓ Secret Scanning
  ✓ Post Checkout code
  ✓ Complete job

Fork workflow run: https://github.com/rathodkunj2005/diffusers/actions/runs/31270994941

@github-actions github-actions Bot added fixes-issue CI size/S PR with diff < 50 LOC and removed fixes-issue labels Aug 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI size/S PR with diff < 50 LOC

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Secret Leaks workflow fails on every new-branch push (6 of the last 30 runs)

1 participant