Skip to content

Commit 9079c49

Browse files
committed
fix(ci): swap gitleaks-action for TruffleHog OSS — gitleaks requires a paid license for org-owned repos
The OSS gitleaks-action exits with `missing gitleaks license` when run in an org-owned repo (per the action's recent breaking change). The constraint here is free-tier compatibility, so swap to trufflesecurity/ trufflehog — same diff-focused secret-scan use case, no license check. Renamed the workflow file gitleaks.yml -> secret-scan.yml so the name no longer implies the underlying tool.
1 parent 35a0488 commit 9079c49

2 files changed

Lines changed: 43 additions & 45 deletions

File tree

.github/workflows/gitleaks.yml

Lines changed: 0 additions & 45 deletions
This file was deleted.

.github/workflows/secret-scan.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: secret-scan
2+
3+
# Diff-focused secret scan via TruffleHog (free for org repos; gitleaks-
4+
# action requires a paid license for org-owned repos). Complements Socket
5+
# Security (supply-chain focused, not secret-in-diff focused).
6+
#
7+
# On PRs: scans only the commit range between base and head — fast.
8+
# On push to main: scans full history of the new commits since last push,
9+
# which is what GitHub passes by default.
10+
11+
on:
12+
pull_request:
13+
push:
14+
branches: [main]
15+
16+
permissions:
17+
contents: read
18+
19+
concurrency:
20+
group: secret-scan-${{ github.ref }}
21+
cancel-in-progress: true
22+
23+
jobs:
24+
trufflehog:
25+
name: TruffleHog OSS scan
26+
runs-on: ubuntu-latest
27+
timeout-minutes: 5
28+
steps:
29+
# pin: v6.0.0 -- actions/checkout
30+
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3
31+
with:
32+
# Full history so the scan can compare base..head (PRs) or walk
33+
# the new commits (push). TruffleHog needs both endpoints.
34+
fetch-depth: 0
35+
36+
# pin: v3.95.2 -- trufflesecurity/trufflehog
37+
- name: Run TruffleHog
38+
uses: trufflesecurity/trufflehog@17456f8c7d042d8c82c9a8ca9e937231f9f42e26
39+
with:
40+
# `base` is unset on push events; the action computes the
41+
# commit range itself in that case. On PR events the action
42+
# uses base + head from the event payload.
43+
extra_args: --only-verified

0 commit comments

Comments
 (0)