Skip to content

Commit eccbed8

Browse files
fabro-sh-fabro[bot]Fabro
andauthored
Remove unused SecretRedactor registry and update stale comments (#574)
The exact-value secret registry (`SecretRedactor`) was built as infrastructure ahead of its wiring, but the wiring was never merged — the team settled on content-based redaction (entropy analysis + gitleaks patterns) as the sole mechanism. The type had zero consumers outside its own crate. This PR removes it and corrects two doc comments that described the abandoned design as pending. **What changed:** 1. `fabro-redact/src/secret_registry.rs` deleted in full (~217 lines), with its `mod` declaration and `pub use` re-export removed from `lib.rs`. `Region`, `redact_string`, `redact_json_value`, `DisplaySafeUrl`, and everything else in the crate are untouched. 2. The `resolve_extra_headers` doc in `fabro-auth` no longer promises future exact-match registration. It now honestly states that low-entropy header values not shaped like credentials are not caught by content-based redaction. 3. The `InterpString` module doc in `fabro-types` no longer describes a pending per-run registry. It states the real architecture: resolved secret values are plain strings, and redaction is content-based applied at output serialization. **Known limitation (pre-existing, not introduced here):** a declared secret whose value is a low-entropy ordinary word (e.g. an environment name) is not caught by content-based detection. This was the gap `SecretRedactor` was meant to fill; it is an accepted trade-off, not a regression from this PR. ### Fabro Details <details> <summary>Ran 8 stages in 26m 21s for $2.27</summary> | Stage | Duration | Cost | Retries | |---|---|---|---| | start | 0s | – | 0 | | toolchain | 1s | – | 0 | | preflight_compile | 2m 34s | – | 0 | | preflight_lint | 2m 45s | – | 0 | | implement | 0s | – | 0 | | simplify_fable | 9m 44s | $2.27 | 0 | | simplify_gpt | 0s | – | 0 | | verify | 10m 50s | – | 0 | | **Total** | **26m 21s** | **$2.27** | **0** | </details> <details> <summary>Ran <code>ImplementPlan.fabro</code> (11 nodes and 14 edges)</summary> ```dot digraph ImplementPlan { graph [ goal="Implement and simplify", model_stylesheet=" * { model: claude-opus-4-8; } " ] rankdir=LR start [shape=Mdiamond, label="Start"] exit [shape=Msquare, label="Exit"] toolchain [label="Toolchain", shape=parallelogram, script="command -v cargo >/dev/null || { curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y && sudo ln -sf $HOME/.cargo/bin/* /usr/local/bin/; }; cargo --version 2>&1", max_retries=0] preflight_compile [label="Preflight Compile", shape=parallelogram, script="cargo check -q --workspace 2>&1", max_retries=0] preflight_lint [label="Preflight Lint", shape=parallelogram, script="cargo +nightly-2026-04-14 clippy -q --workspace --all-targets -- -D warnings 2>&1", max_retries=0] fix_lints [label="Fix Lints", prompt="The preflight lint step failed. Read the build output from context and fix all clippy lint warnings.", max_visits=3] implement [label="Implement", prompt="Read the plan file referenced in the goal and implement every step. Make all the code changes described in the plan. Use red/green TDD. Be sure to use the rust-style-guide skill to help you follow this repo's Rust style conventions.", model="gpt-55", reasoning_effort="xhigh"] simplify_fable [label="Simplify (Fable)", prompt="@prompts/simplify.md", model="claude-fable-5", reasoning_effort="xhigh"] simplify_gpt [label="Simplify (GPT-55)", prompt="@prompts/simplify.md", model="gpt-55"] verify [label="Verify", shape=parallelogram, timeout="1800s", script="git fetch origin main 2>&1 && git merge --no-edit --no-stat origin/main 2>&1 && cargo +nightly-2026-04-14 fmt --all 2>&1 && cargo dev docs refresh 2>&1 && cargo +nightly-2026-04-14 fmt --check --all 2>&1 && { command -v rg >/dev/null 2>&1 || { echo 'rg is required for verify'; exit 127; }; } && ! rg -n 'AuthMode::Disabled|RunAuthMethod|RunSubjectProvenance|\bActorRef\b|\bActorKind\b|AuthenticatedSubject|AuthenticatedService|AuthorizeRunScoped|AuthorizeRunBlob|AuthorizeStageArtifact|AuthorizeCommandLog|auth_method\s*==\s*\"disabled\"' lib/crates apps lib/packages docs/public/api-reference/fabro-api.yaml 2>&1 && cargo +nightly-2026-04-14 clippy --workspace --all-targets -- -D warnings 2>&1 && cargo nextest run --workspace --status-level slow --profile ci 2>&1 && cargo dev docs check 2>&1 && bun install --frozen-lockfile 2>&1 && (cd apps/fabro-web && bun run typecheck) 2>&1 && (cd apps/fabro-web && bun run test) 2>&1 && (cd lib/packages/fabro-api-client && bun run typecheck) 2>&1 && cargo dev build -- -p fabro-cli --release 2>&1", goal_gate=true, retry_target="fixup"] fixup [label="Fixup", prompt="The verify step failed. Read the build output from context and fix all format, clippy, Rust test, docs, TypeScript typecheck/test, and build failures.", max_visits=3] start -> toolchain toolchain -> preflight_compile [condition="outcome=succeeded"] toolchain -> exit preflight_compile -> preflight_lint [condition="outcome=succeeded"] preflight_compile -> exit preflight_lint -> implement [condition="outcome=succeeded"] preflight_lint -> fix_lints fix_lints -> preflight_lint implement -> simplify_fable -> simplify_gpt -> verify verify -> exit [condition="outcome=succeeded"] verify -> fixup fixup -> verify } ``` </details> ⚒️ Generated with [Fabro](https://fabro.sh) --------- Co-authored-by: Fabro <noreply@fabro.sh>
1 parent 52d8c01 commit eccbed8

4 files changed

Lines changed: 8 additions & 225 deletions

File tree

lib/crates/fabro-auth/src/resolve.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -477,9 +477,10 @@ impl CredentialResolver {
477477

478478
/// Resolve a provider's `extra_headers` interpolation sources with `ctx`.
479479
///
480-
/// Provider header secrets resolve outside the run-boundary redactor
481-
/// registration path. Keep this path free of value logging until exact-match
482-
/// registration is threaded through.
480+
/// Resolved header values may contain secrets; keep this path free of value
481+
/// logging. Content-based redaction covers credential-shaped values on output
482+
/// surfaces, but no mechanism redacts these exact values, so a low-entropy
483+
/// header value that does not look like a credential is not caught.
483484
pub(crate) fn resolve_extra_headers(
484485
provider: &ProviderId,
485486
headers: &HashMap<String, String>,

lib/crates/fabro-redact/src/lib.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,9 @@ mod entropy;
88
mod gitleaks;
99
mod jsonl;
1010
mod safe_url;
11-
mod secret_registry;
1211

1312
pub use jsonl::{redact_json_value, redact_jsonl_line};
1413
pub use safe_url::{DisplaySafeUrl, DisplaySafeUrlError};
15-
pub use secret_registry::SecretRedactor;
1614

1715
pub(crate) const REDACTION_MARKER: &str = "REDACTED";
1816

lib/crates/fabro-redact/src/secret_registry.rs

Lines changed: 0 additions & 217 deletions
This file was deleted.

lib/crates/fabro-types/src/settings/interp.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,10 @@
1414
//! Resolution timing is split: `vars` substitutes early (server-side, at run
1515
//! creation) via [`InterpString::substitute_with`], while `env`/`secrets`
1616
//! resolve late, at consumption time in the process that owns
17-
//! the value, via [`InterpString::resolve_with`]. Declared-secret values are
18-
//! intended to be registered into a per-run exact-value redactor where secrets
19-
//! resolve; sensitivity is not tracked on resolved strings.
17+
//! the value, via [`InterpString::resolve_with`]. Resolved secret values are
18+
//! plain strings; sensitivity is not tracked. Redaction of run output is
19+
//! content-based (entropy analysis plus credential patterns), applied where
20+
//! output is serialized.
2021
2122
use std::borrow::Cow;
2223
use std::fmt;

0 commit comments

Comments
 (0)