job7 capitalize: BDR-057, BDR-026 update, LRN-108, journal
BDR-057: secrets by reference not by value; redact at capture, not just at
rest. Documents the two-part job7 posture (MCP ${VAR} expansion + rtk-rewrite
env-dump redaction) and flags the unreconciled contradiction with job6's
same-day (wrong) finding that ${VAR} expansion was unsupported at user scope.
BDR-026 updated: the backup-vector incident (2026-07-02) is closed at the
source rather than by repeated scrubbing — every native auto-backup taken
while the live file held the plaintext value was a fresh leak, so scrubbing
existing backups alone would have recurred forever.
LRN-108: `claude mcp add --env KEY=value` writes the value literally —
double- vs single-quoting around `${VAR}` is the entire difference between
a reference and a plaintext-forever config. The natural way to type the
flag (bash-expand it first) is exactly the trap.
Also refreshed .audit/scan-secrets-claude-home.json to the post-purge state
(15 residual hits, down from 18 pre-D).
This commit is contained in:
@@ -354,3 +354,4 @@ rules:
|
||||
- job6 dep-upgrade audit shipped read-only: `.audit/job6-report.md` — rtk/gsd-pi/gstack/ctx7/graphifyy/semgrep/impeccable/emil/darwin/magic MCP census, BATCH-1/2/3 verdicts, 22 CONFIRMED/2 CORRECTED/0 REFUTED. Incident: explorer copied plaintext MAGIC_API_KEY into scratch, redacted post-check — [[LRN-107]].
|
||||
- User GO full execution, prerequisites confirmed upfront (gstack #2047 human review → pull complet + reapply local fix; MAGIC_API_KEY rotated). Sequenced by risk, one upgrade = one commit = one gate, chore/job6-deps-upgrade, no finish.
|
||||
- job6 EXECUTED: ctx7 0.5.3→0.5.4 (zero repo diff), graphifyy binary 0.9.6→0.9.8 (hook-guard rewrite of config-protected `.claude/settings.json` traced to source, diff shown, user declined adoption), gsd-pi 2.64.0→3.0.0 (`b4896c9` — 3.0.0 confirmed format-incompatible with status-reporter's ROADMAP.md parser via a real scratch-dir test milestone; ADR-013 cutover, DB-authoritative, no ROADMAP.md at all; user chose patch-now, parser rewired to `gsd headless query` JSON, smoke-tested both cases), gstack submodule 070722a→11de390 (`2813e55` — full pull per verdict, #1911 fail-open guards + PII/telemetry/data-loss fixes; local playwright patch (BDR-029) backed up then discarded then correctly reapplied via the documented bump function, landed one minor ahead since upstream moved meanwhile; /careful + /freeze smoke-tested blocking live), supply-chain docs (`00c97bc` — pipx-only graphifyy rule, semgrep p/* runtime-pack caveat; MCP magic version pin declined by user, `${VAR}` env-expansion confirmed unsupported at `~/.claude.json` user scope after 2 rounds of sourced doc lookup — BDR-026 pattern doesn't transfer there, regenerated live config instead via toggle-external.sh to pick up the rotated key). `make test` 90/90 green + `doctor.sh` 0 errors throughout. Incident: mid-session Bash tool universally unresponsive again post-`/tmp` exhaustion (same class as job4's), user cleared it, resumed from confirmed git state. [[EVAL-020]], [[BDR-056]] (deps policy reversal: latest gated by integration, not KEEP-PINNED default). Branch unmerged, human gate — orphan `~/skills-lock.json` (F-S1) also deleted, non-repo file, no commit.
|
||||
- job7 secrets backstops shipped, `chore/job7-secrets`, 4 commits (A/B/C/D), `make test` 96/96 green throughout. **A**: MAGIC_API_KEY's sole writer confirmed (`lib/toggle-external.sh:191`, no other). Doc lookup found `${VAR}` expansion IS supported at `~/.claude.json` user scope — contradicts job6's own same-day finding, not reconciled (see [[BDR-057]] caveat). Rewrote to `--env 'API_KEY=${MAGIC_API_KEY}'` + scoped `~/.bashrc` `claude()` wrapper (subshell+exec, verified the var never reaches the ambient shell) over a global export (user's call); `~/.claude.json` rewritten via surgical jq (never Read directly); README procedure doc added; 2 of 5 rotating `.claude.json.backup.*` still had the plaintext mid-fix, scrubbed. **B**: `hooks/rtk-rewrite.sh` now redacts bare `printenv`/`env` dumps (the GITEA leak's actual vector). Mid-implementation discovery: rtk classifies ANY `env`-containing command as exit-2 "deny" with no settings.json rule backing it (command still runs) — case handling fixed so redaction applies regardless. **C**: `.gitleaks.toml` (3 job7 false-positive classes + `.env` self-scan exclusion, all verified empirically against the real files, not assumed); pre-commit backstop wired into `lib/gitflow.sh` after the root/merge guard, ANY branch; `make scan-secrets` (repo + `~/.claude`, `--redact` confirmed to scrub the JSON report itself, not just logs). gitleaks 8.30.1: `protect` no longer in `--help` — used documented `git --staged`. **D** (GO-gated): rm'd transcript `960bd2cf` + `paste-cache/7d48f52c7499c1a7.txt` (both GO'd); `cleanupPeriodDays` 30→7 (1st write attempt correctly blocked by the auto-mode classifier for narrating the diff instead of actually pausing — re-asked properly). `make scan-secrets` surfaced 3 discoveries outside the original triage: `ide/20429.lock` (live, not touched), transcript `f1c9c474-...jsonl` (8 hits, left open — no option chosen). Residuals: MAGIC_API_KEY rotation still pending user action; magic MCP end-to-end reconnect needs a terminal+Claude Code restart; live `claude mcp add` test correctly blocked (self-modification, unrequested). [[BDR-057]], [[LRN-108]].
|
||||
|
||||
Reference in New Issue
Block a user