Skip to content

secret-scrub: scheduled runner also audits .git/config (fourth pathway) - #4

Merged
decider merged 1 commit into
mainfrom
feat/runner-dual-pass-git-configs
May 24, 2026
Merged

secret-scrub: scheduled runner also audits .git/config (fourth pathway)#4
decider merged 1 commit into
mainfrom
feat/runner-dual-pass-git-configs

Conversation

@decider

@decider decider commented May 24, 2026

Copy link
Copy Markdown
Owner

Closes the loop on the .git/config leak pathway for installed scrubbers. The working-trees launchd/systemd timer now runs two passes per fire:

  1. --working-trees — redact secrets in uncommitted/untracked files (existing)
  2. --git-configsreport embedded .git/config credentials (new, detect-only)

Why detect-only for pass 2

A background job silently rewriting your git auth (token → credential-helper fallback) would be a surprising side effect mid-work. So it logs the finding; you run --fix deliberately. The detect pass's rc=1 is swallowed with || true so the whole cron job doesn't go red — the log report is the signal.

Effect

Once the working-trees timer is installed, all four leak pathways (sessions, staged, working-trees, git-configs) are continuously monitored from one job. Reuses ~/.config/secret-scrub/working-trees.txt — no new config.

Generated with Claude Code

The scheduled launchd/systemd timer now runs TWO passes per fire on
the configured repos:

  1. --working-trees  — redact secrets in uncommitted/untracked files
  2. --git-configs    — REPORT embedded .git/config credentials

Pass 2 is detect-only: a background job silently rewriting git auth
(stripping a token → credential-helper fallback) would be a surprising
side effect, so it only logs the finding and leaves the deliberate
--fix to the operator. rc=1 from the detect pass is swallowed
('|| true') so a found-credential doesn't mark the whole cron job
failed — the log report is the signal.

Effect: once the working-trees timer is installed, ALL four leak
pathways are continuously monitored from one job, not just three.
Reuses the existing repo list (~/.config/secret-scrub/working-trees.txt);
no new config. Bash 3.2 compatible (exec → sequential calls).
@decider
decider merged commit 0f4d863 into main May 24, 2026
3 checks passed
@decider
decider deleted the feat/runner-dual-pass-git-configs branch May 24, 2026 18:25
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