Skip to content

Scan each change for secrets with gitleaks - #14

Open
sasha-s wants to merge 2 commits into
main-positronicfrom
sl/lane_gitleaks_sweep/gr00t
Open

sasha-s wants to merge 2 commits into
main-positronicfrom
sl/lane_gitleaks_sweep/gr00t

Conversation

@sasha-s

@sasha-s sasha-s commented Oct 20, 2026 •

Copy link
Copy Markdown
Collaborator

What

Every pull request and every push to main-positronic now runs a gitleaks check. It scans only the commits being added, with the gitleaks default rules plus four rules for credentials the defaults miss: Nebius IAM tokens, Anthropic OAuth tokens, Tailscale keys, and a literal credential passed as a command-line flag (--token <value>). A finding fails the check and prints file, line, commit and rule id, never the value.

The workflow calls the reusable workflow in Positronic-Robotics/secret-scanning, pinned to commit 17271b2. The job runs on ubuntu-latest with contents: read and no secrets.

Files

  • .github/workflows/gitleaks.yml: the caller, 20 lines.
  • .gitleaks.toml: a byte copy of the shared rules. The check fails if the copy differs.

No pre-commit hook is added: this repository follows an upstream, and its pre-commit config would conflict on every sync.

Checks

A full scan of the current tree with these rules finds nothing. Reverting this PR removes the check and changes nothing else.

For contributors

  • A deliberate fake value in a test: add gitleaks:allow in a comment on that line.
  • A file that cannot take comments: add file:rule:line to .gitleaksignore. The job prints every waiver a PR adds, so reviewers see it.
  • A real secret is caught: revoke it first, because a PR ref stays readable after the branch is deleted. Then remove it from the branch.

🤖 Generated with Claude Code

sasha-s and others added 2 commits October 20, 2026 14:25
The workflow calls the shared reusable workflow in Positronic-Robotics/secret-scanning. It scans only the commits that a pull request or a push adds, with the default gitleaks rules and four added rules (Nebius IAM tokens, Anthropic OAuth tokens, Tailscale keys, secrets in command-line flags). A finding shows file, line and rule id, never the value. .gitleaks.toml is a copy of the shared file; the check fails if the copy differs.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The rules copy now matches gitleaks.toml at that commit: the lpass allowlist covers only the
lpass command itself, curl -u with a shell variable is allowed, and cli-flag-secret also catches
quoted values that hold shell punctuation.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
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