Secrets — encrypted in git, safe from AI agents
`sc secrets` encrypts your secrets with your SSH key (RSA or Ed25519) and commits ciphertext to git. Authorized teammates decrypt with their private key. AI agents reading repo files see ciphertext, never values.
.env, *.pem, secrets.yaml — and the ciphertext lives in a single committed registry at .sc/secrets.yaml. Encrypted against every authorized SSH public key (RSA or Ed25519).SC_CONFIG. Local dev: reveal once, then standard docker-compose.Why this is a 2026 feature, not a 2018 one
The first generation of secrets managers (HashiCorp Vault, AWS Secrets Manager, 1Password Connect) solved one problem: keep secrets out of source code. They worked.
What changed in 2025–2026: AI agents read your repo files. Claude Code, Cursor, Codex, Devin, GitHub Copilot Workspace — they all open files, follow paths, and feed contents into LLM context. If your secrets.yaml sits in plaintext (even gitignored), any agent run against the repo has at least a chance to read it, summarize it, paste it into a chat completion, or commit it back.
The 2026 secrets-sprawl report logged 1.27M leaked AI-service credentials in 2025, an 81% YoY jump (GitGuardian). Many of those leaks went through AI agents, not despite them.
SC’s secrets workflow inverts the threat model:
- The plaintext files are gitignored, never committed. The only thing in git is
.sc/secrets.yaml— a registry of encrypted blobs. - Decryption requires a private SSH key that lives in
~/.ssh/, never the repo. - Re-encryption to add or remove a teammate is one command — no rotating keys, no Vault auth tokens, no IAM-policy archeology.
The mechanism, briefly
| |
The repo’s encrypted registry .sc/secrets.yaml carries, for every authorized public key, the list of files and the ciphertext encrypted under that key. To decrypt, SC matches the user’s private key against the right block. To revoke, sc secrets disallow <key> removes that key’s blocks and re-encrypts the registry without it.
There’s no central server. No KMS subscription. The cryptography is the access policy.
Reference syntax in your client.yaml
| |
sc deploy decrypts, injects the values into the deployment target’s environment, and zeros them from memory.
What this enables
- Multi-agent workflows on real infra. Forge — our flagship — runs Claude Code agents that touch real deployments. Forge sits on top of SC’s encrypted-in-git foundation, layered with a per-invocation secret manifest, JIT-vs-proxy credential transport, and outbound DLP, so agents never hold plaintext credentials in their address space.
- Compliance by construction. SOC 2 evidence for “secrets at rest” reduces to “we never have plaintext at rest.” Audit log is
git log. - No vendor lock-in. Standard SSH keys work everywhere. Self-host SC, take your secrets with you.
Compared to alternatives
| Tool | Mechanism | AI-agent surface |
|---|---|---|
| Plain env file (.env, .env.local) | Plaintext on filesystem | Any agent reading files leaks |
| Vault / AWS Secrets Manager | Network-fetched, with broker | Agent that calls broker still holds plaintext briefly |
| Doppler / 1Password Connect | Network-fetched, broker pattern | Same — broker call materializes plaintext into the agent’s process |
| GitHub Encrypted Secrets | Encrypted, GitHub-only | Inside GH Actions, becomes env vars an agent in CI can read |
SC sc secrets | Ciphertext at rest in git, SSH-key decrypt at use | Repo contents leak ciphertext only; decrypt happens at deploy boundary |
The pattern doesn’t replace KMS-backed brokers everywhere — they still have a role for runtime-rotated credentials and dynamic auth. But for secrets that need to exist in source control (config schema, integration keys for design partners, CI bootstrap creds, deploy keys), SC’s encrypted-in-git approach is the one that matches the post-AI threat model.
Ship your infrastructure on autopilot.
Try the SC parent stack in your own repo, or see what we built on top of it — Forge, our flagship AI workflow engine for teams.