secret-scrub: scheduled runner also audits .git/config (fourth pathway) - #4
Merged
Merged
Conversation
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).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes the loop on the .git/config leak pathway for installed scrubbers. The working-trees launchd/systemd timer now runs two passes per fire:
--working-trees— redact secrets in uncommitted/untracked files (existing)--git-configs— report embedded.git/configcredentials (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
--fixdeliberately. The detect pass'src=1is swallowed with|| trueso 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