Mask secrets in sync errors and diffs — how Aura redacts before they leak
Aura's redact pipeline strips API keys, JWTs, and dotenv values out of sync errors, diffs, and agent prompts before they leave the machine. Pattern set + custom rules.
When an AI coding agent fails a sync, the failure log is gold for debugging, and a goldmine for accidental credential leaks. Aura masks secrets in sync errors and diffs before any line is written to disk, sent to the cloud, or shown to an LLM.
What gets masked, by default
- AWS access keys (
AKIA…), secret keys, session tokens. - Google / GCP service account keys, OAuth refresh tokens.
- Stripe live + test keys (
sk_live_,sk_test_,rk_live_). - GitHub, GitLab, Bitbucket personal access tokens (
ghp_,glpat-, etc.). - Generic high-entropy strings > 32 chars matching the JWT three-segment shape.
- Anything matching a value in a
.env,.env.local, or.envrcthe agent can see.
Where masking runs
The redact pipeline sits in front of three sinks:
- Sync error log: every line emitted by
aura live sync push/pullis filtered through the redactor beforeprintln!. - Diff payload ·
aura_pr_reviewandaura attest verifyredact diff hunks before sending them to the LLM that scores them. - Cloud uploads: anything written to
/api/v2/*(rotation chains, intent blocks, sentinel events) is redacted on the client side, not the server. The server never sees the raw secret to begin with.
Adding custom patterns
# .aura/redact.toml
[[pattern]]
name = "internal-pagerduty-key"
regex = "(?i)pd_(test|live)_[a-z0-9]{32}"
mask = "pd_***"
[[pattern]]
name = "customer-bearer"
regex = "Bearer\\s+[A-Za-z0-9._-]{60,}"
mask = "Bearer ***"Why client-side, not server-side
A redactor that runs on the cloud server is a redactor that has already been handed your secret. Aura redacts before the bytes leave your machine: the threat model assumes the cloud is honest-but-curious, and the CLI never trusts it with anything it wouldn't show in git diff.
How do you stop secrets leaking into diffs and error messages?
Redact at the point of output rather than trusting input. Scan for known key shapes and high-entropy strings before anything is displayed, logged or synced, and replace the value with a placeholder that keeps the surrounding text readable.
What counts as a secret worth redacting?
Anything shaped like a credential: provider-prefixed API keys, bearer tokens, private key blocks, connection strings with a password, and long high-entropy values in a variable named like a secret. False positives are cheap; a leaked key is not.
Do coding agents leak secrets?
They can, without any intent to. An agent reads a .env to understand configuration, then quotes a line into an error report, a commit message or a summary. The leak is in the surrounding telemetry rather than the code.
Aura Crew vs Claude Code Loops: the autonomous work-loop, compared
Claude Code defines four loop types — turn-based, goal, time, and proactive. Aura Crew is the same idea productized: a dependency-ordered work-loop with proof, collision-safety, and any agent. Full comparison.
Autonomous coding agent loops, explained: turn-based, goal, time, and proactive
A coding agent loop is an agent repeating cycles of work until a stop condition is met. The four types explained — turn-based, goal-based, time-based, proactive — with when to use each and how to keep quality high.
How to run multiple coding agents in parallel without merge conflicts
Running several AI coding agents at once collides on shared files. The fix: a worktree per agent, a live team radar, and soft-to-hard zone claims so parallel agents never touch the same symbol. How Aura Crew does it.
Goal-based agent loops: giving a coding agent a definition of done
A goal-based loop keeps a coding agent iterating until a success criterion is met. The trick is a deterministic definition of done — tests, a score, a proof — not an LLM guessing at "good enough." How to write one.