FIR-429 credential injection - #295
Draft
nappa85 wants to merge 39 commits into
Draft
Conversation
nappa85
marked this pull request as draft
July 15, 2026 16:45
nappa85
force-pushed
the
marconapetti/fir-429-pai-credential-injection
branch
14 times, most recently
from
July 22, 2026 13:15
43c9654 to
9fd5dae
Compare
nappa85
force-pushed
the
marconapetti/fir-429-pai-credential-injection
branch
9 times, most recently
from
July 27, 2026 09:56
ed16939 to
088b5b2
Compare
added 26 commits
July 27, 2026 11:57
nappa85
force-pushed
the
marconapetti/fir-429-pai-credential-injection
branch
from
July 27, 2026 10:02
088b5b2 to
b6e98bc
Compare
nappa85
force-pushed
the
marconapetti/fir-429-pai-credential-injection
branch
from
July 27, 2026 12:25
87fffd9 to
54ead3e
Compare
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.
Why
firma runneeds to keep real secret values out of the agent while still lettingsanctioned tools use them: an agent should be able to fetch and use a secret
without the plaintext ever passing through the agent (or the LLM). This introduces
a Cedar-driven secret interception and redaction mechanism at the process
stdio boundary — the one transport-agnostic point where a vault CLI's plaintext
reliably appears. Full design:
docs/architecture/secrets-interception.md(FIR-429).What Changed
firma-secret://<provider>/<name>placeholder, and stores the real value in an out-of-sandbox, run-scoped, zeroized broker dictionary; redact rehydrates placeholders → secrets on a sanctioned tool's stdin and masks secrets → placeholders on its stdout. No tool is special-cased in code — a new vault CLI is just a new policy.secret.mediateaction plus@mode/@matcher/@match_value/@match_name/@match_pattern/@placeholder/@transformannotations, modeled as aSecretMediationenum (Intercept { matcher, placeholder }/Redact { transform }) so illegal combinations are unrepresentable. Matchers (JSONPath or regex) and transforms (raw,mcp-jsonrpc) are validated at bundle-load — a bad pattern fails the bundle closed.SCM_RIGHTSfd-passing, made unavoidable by bind-over-path; shims hold no secrets.firma.tomlholds only the mechanism residue: a per-profileshimsexecutable list (which commands to interpose on). All behavior stays in Cedar, so the config is not secret-specific.json/regexextraction + minting), both redact transforms (rawstreaming with overlap buffers,mcp-jsonrpcline-framed JSON-aware rewrite),shimsconfig + PATH/bind-over-path shim injection, and Playwright MCP as the first redact target — with the design doc, docs-site, andllms.txtupdated.Risks / Notes
BWS_ACCESS_TOKEN) stays in-sandbox by design; stdout masking is best-effort defense-in-depth (transformed secrets — base64/hex/chunked — won't match); a hostile agent couldptracea specific sanctioned tool to see a secret it itself routed there, but cannot enumerate the dictionary.secret.mediategovernance request/response over the existing local-exec socket (per-launch, local, off the hot path).npxmeans every launch pays a shim + governance round-trip even when ungoverned (then passes through) — keepshimslists tight.bwrapbackend only; PTY/interactive tools, VM/WSL backends, and additional vault CLIs are deferred hardening (no code changes needed for new CLIs — just new policies).AI Assistance
claude-opus-4-8