chore(ci) move personal identity patterns to repo secret#109
Merged
Conversation
The two hardcoded personal-identity patterns in sanitization.yml (jim@earlybird and @earlybirdsolutions literals) become a single secret-sourced PERSONAL_IDENTITY_PATTERN rule, mirroring the existing WORK_EMAIL_PATTERN precedent. Eliminates the recursive-trap risk where any future doc that needs to reference the rule itself would have to mask the literal — the @-masking remediation in PR #101 was the original incident, and follow-up #1 from the 2026-05-08 late-evening handoff queued this cleanup. The inline ERE-validation + skip-when-unset block is extracted into a single run_secret_rule helper so PERSONAL_IDENTITY_PATTERN and WORK_EMAIL_PATTERN share one validated implementation rather than duplicating the ~25-line bash incantation (errexit / pipefail / || pattern_rc=$? interaction is subtle — one tested path is safer than two parallel ones). Behavior preserved: warn-and-skip when the secret is unset, fail-with-clear-error on a malformed ERE, run the rule otherwise. Operator step required pre- or at-merge: set PERSONAL_IDENTITY_PATTERN in repo Settings -> Secrets and variables -> Actions, value the OR-ed ERE for the personal email + domain. Until set, the personal-identity scan emits a workflow warning rather than enforcing the rule, so the maintainer should set the secret and the unguarded window stays minimal.
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.
Summary
Move the two hardcoded personal-identity patterns (
jim@earlybirdand@earlybirdsolutionsliterals) out of the public.github/workflows/sanitization.ymland into a newPERSONAL_IDENTITY_PATTERNrepo secret, mirroring the existingWORK_EMAIL_PATTERNprecedent. Why: any future doc that describes the workflow's own ruleset would otherwise have to mask the literals — the@-masking remediation in PR #101 (DL-0004) was the original incident, and architectural follow-up #1 from the 2026-05-08 late-evening handoff queued this cleanup.The inline ERE-validation + skip-when-unset block is extracted into a single
run_secret_rulebash helper soPERSONAL_IDENTITY_PATTERNandWORK_EMAIL_PATTERNflow through one validated implementation rather than duplicating the ~25-line incantation across two callsites. The errexit / pipefail /|| pattern_rc=$?interaction is subtle (one tested path is safer than two parallel copies). Behavior preserved end-to-end: warn-and-skip when the secret is unset, fail-with-clear-error on a malformed ERE, run the rule otherwise.Operator step required pre- or at-merge
Set
PERSONAL_IDENTITY_PATTERNin repo Settings → Secrets and variables → Actions, value the OR-ed ERE for the personal email + domain (e.g.name@host|@domain). Until set, the personal-identity scan emits a workflow warning rather than enforcing the rule. To minimise the unguarded window: set the secret immediately before merge, or as the first action after merge.Test Plan
DL-0004 local-verification protocol against the new
run_secret_rulehelper (the rule must not be exercised on a remote branch — pushing trigger literals leaks via the ~90-day GitHub reflog). Behaviour-tested four cases against a stubbedrun_rule:::warningemitted,failunchangedname@host|@domainrun_ruleinvoked[unbalanced::erroremitted,fail=1run_ruleinvoked, no errorAdditional checks:
python -c "import yaml; yaml.safe_load(open('.github/workflows/sanitization.yml'))"— YAML parses cleanly.bash -nagainst the extracted run-block — no syntax errors.grepforjim@earlybirdand@earlybirdsolutions— zero matches anywhere (workflow file no longer contains them; no other file ever did).Out of Scope
PERSONAL_IDENTITY_PATTERNvalue here — the value lives only in the repo secret per DL-0004. CI on this PR will run with the secret either set or unset; either is a valid post-merge state.JungleTechrule at L141 stays hardcoded — it's not personally-identifying and the prior-client-name guard is already documented inline.run_secret_rule. Both current secret rules want-i; if a third secret-sourced rule lands that needs case-sensitivity, generalise then.Checklist
docs/adr/— N/A (small infra cleanup, not architectural)README.mdand/ordocs/are updated in the same PR — N/A (CI-only change)~/.claude/projects/c--projects-PinballWizard/memory/is now stale, it has been updated or removed in the same PR — handled in next session-handoff entryTODO/FIXME/ commented-out code committed<NoWarn>without a comment explaining why and the removal criterion — N/APre-push self-audit (additive PRs)
Step 0 —
/local-review(qualitative)/local-reviewand addressed every 🔴 finding before pushPERSONAL_IDENTITY_PATTERNrepo secret pre- or at-merge — called out in Summary.Step 1 — Mechanical checklist
*Optionsproperty has at least one real getter call insrc/— N/A (no*Optionsclass added; two env vars added, both read at sanitization.yml L150 + L158)catch { }— N/A (YAML/bash only)ISourceScraper? — N/Agit log -1 --format='%an <%ae>'shows personal noreply, not work email —Jim Keeley <94459922+jkeeley2073@users.noreply.github.com>