/** * Best-effort credential redaction for generated operational skills. * * Two rules, and the second matters as much as the first (AC-11): * * - Credential **values** are redacted. A generated skill is instructions an * agent will later execute, and it is committed to the repo, so a pasted token * would become a secret at rest (NFR-3). * - Credential **references** are preserved. `$GITHUB_TOKEN`, * `op://vault/item/field`, `arn:aws:secretsmanager:...` are legitimate * operational content; stripping them would produce a skill that cannot work. * * **This is explicitly best-effort and not a security guarantee.** Detection is * pattern- plus entropy-based, so novel credential formats will pass through. The * real control is the confirmation gate: redaction runs *before* the preview is * rendered (AC-44), so a human sees the redacted text and nothing reaches disk * without their approval. Callers must not present this as a guarantee to users. * * Requirements: AC-11, AC-44, NFR-3 * * @module */ /** Placeholder substituted for a redacted value. */ export declare const REDACTION_PLACEHOLDER = ""; /** Result of a redaction pass. */ export interface RedactionResult { /** Text with detected credential values replaced. */ text: string; /** * Human-readable labels for what was redacted (never the values themselves — * echoing them back would defeat the purpose). */ redacted: string[]; } /** * Redact credential values from text, preserving credential references. * * @param text - Text that may contain credentials. * @returns The redacted text plus labels describing what was removed. */ export declare function redactSecrets(text: string): RedactionResult; /** * Convenience: did this text contain anything that looked like a credential? * * @param text - Text to inspect. * @returns True when `redactSecrets` would change the text. */ export declare function containsSecrets(text: string): boolean; //# sourceMappingURL=redact.d.ts.map