Skip to content

ci: replace gitleaks with trufflehog - #872

Merged
nikitabelonogov merged 2 commits into
masterfrom
ci-trufflehog
Nov 3, 2026
Merged

nikitabelonogov merged 2 commits into
masterfrom
ci-trufflehog

Conversation

@nikitabelonogov

@nikitabelonogov nikitabelonogov commented Nov 2, 2026 •

Copy link
Copy Markdown
Member

Replaces gitleaks with TruffleHog, matching HumanSignal/hs-platform#3611.

What changes

  • .github/workflows/gitleaks.yml → .github/workflows/trufflehog.yml. Same scope as before: the commits of each PR (the job only runs on `pull_request`).
  • --no-verification: candidates are never sent to provider APIs, so every hit fails the job. Findings print as detector + file:line + commit only; the raw JSON (which holds the values) is not uploaded.
  • The scan starts from git merge-base base head: TruffleHog's --since-commit must be an ancestor of the head, otherwise it scans nothing and reports success.

False positives: add trufflehog:ignore on the line after the value (it is ignored before it), or a path regex in a .trufflehogignore file (the workflow passes it when present).

Checked: actionlint clean; the scan step was run locally against this repo's last 30 commits on the default branch, and against a synthetic repo (planted token → fails with its location; ignored path → passes; new branch with zero base → skips).

🤖 Generated with Claude Code

nikitabelonogov and others added 2 commits November 2, 2026 20:25
Same scope as before: the commits between the base and the head of each
PR (and push, where gitleaks ran on push). --no-verification, so every
candidate fails the job and nothing is sent to provider APIs; findings
print as detector + file:line only.

False positives: `trufflehog:ignore` after the value on its line, or a
path regex in .trufflehogignore.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
PRs only scan their own commits, so the old cassette lines are never
scanned; excluding the files would only hide a key in a re-recorded
cassette.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@nikitabelonogov
nikitabelonogov marked this pull request as ready for review November 3, 2026 10:12
@nikitabelonogov
nikitabelonogov requested a review from a team as a code owner November 3, 2026 10:12
@nikitabelonogov
nikitabelonogov merged commit 1b57923 into master Nov 3, 2026
8 of 14 checks passed
@nikitabelonogov
nikitabelonogov deleted the ci-trufflehog branch November 3, 2026 10:12
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