How CodeStilt hides your secrets from the AI
Secret files are never read, and keys inside normal files are swapped for markers before anything leaves your computer.
7 Nov 2026 · 2 min read · CodeStilt teamThere are two kinds of secrets in a project: whole files that are secret, and secret values sitting inside ordinary files. CodeStilt handles them differently.
Secret files are never opened
Files such as .env, private keys, credentials.json, .npmrc, .netrc, Terraform state, and everything in .ssh, .aws, .gnupg, .kube, .docker and .git are skipped when the desktop app reads your project. This rule is locked on. You can add your own patterns in Settings.
Secret values become markers
Before a normal file is sent, the desktop app looks for text that looks like an API key, a token, a password in a connection string or a private key. Each one is replaced with a numbered marker such as [hidden-1], and the real value is kept on your computer.
Putting them back
When the AI sends back a changed file, the desktop app swaps each marker back for the real value before writing the file. If a file would still contain a marker after that, the write is refused, so your real values can never be replaced by a placeholder by accident.
The result: the AI can edit a config file that contains a key without ever seeing the key.