fix(services): redact 'private key' from the agent-action public-safe card (#8020) - #8027
Conversation
… card (JSONbored#8020) PUBLIC_FORBIDDEN_PATTERN in agent-action-explanation-card.ts listed seed phrases and mnemonics but not private keys, so an App-credential reference in why/blockedBy leaked through publicSafe unredacted. The term is present in all five sibling public-redaction vocabularies (miner-dashboard- recommendations.ts, control-panel-roles.ts, decision-pack.ts, weekly-value-report.ts, extension-contributor-context.ts); add the same 'private keys?' alternative here. Regression test pins the redaction.
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
|
Tip ✅ LoopOver review result - approve/merge recommendedReview updated: 2026-07-22 17:23:49 UTC
Review summary Nits — 2 non-blocking
Decision drivers
Context & advisory signals — never blocks the verdict
Linked issue satisfactionAddressed Review context
Contributor next steps
Signal definitions
🧪 Chat with LoopOverAsk LoopOver a question about this PR directly in a comment — grounded only in the same cached, public-safe facts shown above, never a new claim.
Full command reference: https://loopover.ai/docs/loopover-commands 🧪 Experimental — new and may change. 🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed 💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →. Checked by LoopOver, a quiet PR intelligence layer for OSS maintainers.
|
Summary
agent-action-explanation-card.ts'sPUBLIC_FORBIDDEN_PATTERN— the redaction applied bysanitizePublicCardTextto the only text thepublicSafecard ever exposes (summary/whyNow/rerunWhen) — listedseed phrases?/mnemonics?but was missingprivate keys?. Every other public-safe redaction vocabulary in the codebase includes it (miner-dashboard-recommendations.ts:45,control-panel-roles.ts:297,decision-pack.ts:1438,weekly-value-report.ts:417,extension-contributor-context.ts:31), andsrc/signals/redaction.ts:18-22's doc comment claims both this surface and its sibling carry the term — but only the sibling actually did.Concrete leak: an action whose
why/blockedByreferences an App-credential/private-key-rotation topic (a live concept — seesrc/github/app.ts) passed throughpublicSafe.whyNowunredacted.Fix
Add the same
private keys?alternative used by the sibling lists, in the same position (right aftermnemonics?) — no new wording, no new redaction shape. A regression test builds a card whose public-safe text references a private key and asserts it is redacted toprivate context.Scope
wantedPaths(src/services/**,test/unit/**); noblockedPathsValidation
npx vitest run test/unit/agent-orchestrator.test.ts— 21/21 pass (incl. the new#8020regression test)agent-actions,agent-action-executor,policy-sanitizer— 524/524typecheck— clean on changed files (only the 2 pre-existing localsemverTS7016s remain)git diff --checkcleanSafety
Closes #8020