Repository navigation
ci(security): run gitleaks CLI instead of the license-gated action - #84
Conversation
gitleaks-action v3 refuses to run for organization-owned repositories without GITLEAKS_LICENSE, so the secret-scan job failed before scanning a single commit. The license check lives in the action wrapper only; gitleaks itself is MIT-licensed. Invoke the pinned release binary directly — checksum-verified — and scan the full history that fetch-depth: 0 already provides. This also drops the action's 30-commit cap on pull requests, so long PRs are covered on every run instead of only by the weekly schedule. Signed-off-by: Shai Revivo <srevivo@redhat.com> Co-Authored-By: Claude Code <noreply@anthropic.com>
PR Summary by QodoRun checksum-verified gitleaks CLI in the security workflow
AI Description
Diagram
High-Level Assessment
Files changed (1)
|
Code Review by Qodo
1.
|
Review feedback on the CLI swap: - The expected sha256 now lives in the workflow instead of being read from the release's checksums asset. Both came from the same mutable release, so replacing the tarball and its manifest together would have satisfied its own verification. Verified against the published v8.30.1 linux_x64 asset: 551f6fc83ea457d62a0d98237cbad105af8d557003051f41f3e7ca7b3f2470eb - SECURITY.md still described the old 30-commit cap on pull-request scans. Every push, pull request and scheduled run now scans the full history. Signed-off-by: Shai Revivo <srevivo@redhat.com> Co-Authored-By: Claude Code <noreply@anthropic.com>
|
Both Qodo findings addressed in e91352a:
On the linked reports that 8.30.1 "detects nothing": not reproducible here. A commit containing a canonical |
|
🤖 Finished Review · ✅ Success · Started 3:23 PM UTC · Completed 3:33 PM UTC Commit: Runtime: claude · Model: opus → claude-opus-5-5 · Effort: high · Cost: $3.83 |
|
Risk Assessment: moderate (2/5) DetailsSmall CI-only PR (2 files, 36 lines) with one protected-path touch and a CI workflow change driving the Tier 1 score above 1; git history shows low churn, stable files, no fix/revert patterns, and no dependency changes. |
ReviewFindingsHigh
Medium / Low
Labels: PR changes a GitHub Actions workflow (security.yml secret-scan job). Next steps:
|
|
🤖 Finished Retro · ✅ Success · Started 3:40 PM UTC · Completed 3:50 PM UTC Commit: Runtime: claude · Model: opus → claude-opus-5-5 · Effort: high · Cost: $3.17 |
Retro: PR #84 (gitleaks CLI in place of the license-gated action)Outcome: a human-authored CI fix was merged 40 minutes after it was opened. The Qodo bot's two findings (the checksum came from the same release as the binary; SECURITY.md was out of date) were both valid. The author fixed both in What I found:
No new proposals. Every improvement I found is already tracked in an open issue. New evidence from this PR:
Note: the retro run's own log was not readable yet, so the agents repo comes from the review run log ( |
Problem
The
Secret scan (gitleaks)job fails on every run — PR, push and the weekly schedule — before scanning anything:gitleaks-actionv3 requires a paidGITLEAKS_LICENSEfor organization-owned repositories. The check is in the action wrapper only — the gitleaks engine itself is MIT-licensed and needs no key. This blocks every PR on the repo, including dependabot ones (#83).Fix
Replace the action with the pinned, checksum-verified gitleaks release binary and call it directly:
env(GITLEAKS_VERSION: 8.30.1); tarball verified against the release's ownsha256summanifest before extraction, so a tampered or truncated download fails loudly.gitleaks git . --redact --no-banner --exit-code 1scans the full history already fetched byfetch-depth: 0.pull-requests: readpermission dropped — nothing uses the API any more.Side benefit: the action capped pull-request scans at the first 30 commits (merges skipped). The CLI scans all of it, so a long PR is now fully covered on every run rather than only by the Monday schedule.
Verification
secret-scanhas the expected steps and onlycontents: read.1 commits scanned … no leaks found, exit0..gitleaks.tomlexists, so both old and new paths use the default rule set — no change in what counts as a finding.Not fixed here
The
dispatch / Reviewjob fails separately withError: validating Google STS exchange failed(exit 1). That is the Fullsend OIDC → Google Workload Identity Federation handshake, not repo configuration — it needs a look on the harness/platform side.🤖 Generated with Claude Code