Security
Secrets and redaction
Masking before anything leaves, frontier scan and /privacy.
What is masked
Before text reaches a model, a log or the screen, these rules run. Type /privacy in the cockpit to see them live.
| Rule | Catches |
|---|---|
known-secret-value | The exact keys, tokens and passwords configured on this machine. |
key-shape | Text shaped like sk-..., ghp_..., AIza... or a Bearer token. |
private-key-block | PEM text from BEGIN ... PRIVATE KEY onward, even when cut short. |
url-credentials | The password in postgres://user:password@host. |
assigned-secret | A random looking value assigned to a name that ends in password, secret, token or key. |
The last rule is deliberately careful so source code stays readable. The name must end with the secret word, so passwordInput and max_tokens are left alone. The value must be at least 8 characters, mix character kinds and look random. References such as process.env.DB_PASSWORD and your_password_here are not secrets and are kept.
Files that are never sent
Secret files are refused by name for /load, --file, /read and the agent's tools: .env* (except .env.example), *.pem, *.key, id_rsa*, credentials.json, .npmrc, .netrc and similar. On Windows, alternate data streams and device names are refused too.
Scan a folder
frontier scan # the current folder
frontier scan path/to/dir
frontier scan --json # machine readableIt applies the same rules to a whole folder before any AI tool reads it. It prints the file, the line, the rule and a masked preview, never the secret. It lists secret files such as .env by name without opening them, never follows links, and exits 1 when it finds anything, so it can guard a script or a git hook.
Ignore files
.frontierignore, and .claudeignore, in the project root list paths one per line, with *, ** and ? globs, a trailing / for folders and # for comments. Agent discovery skips them. frontier scan honours .frontierignore only, because .claudeignore exists to cut noise such as logs and would hide exactly the build output where a leaked key tends to end up. Negation lines are not supported on purpose.
From an agent
frontier_redact is an MCP tool that applies these rules to any text, so a host can scrub something before pasting it. frontier_audit_repo looks for planted rules files, hidden Unicode and suspicious install hooks as well as exposed secrets. See MCP tools.
Keys on your machine
Keys live in ~/.frontier/.env, written with owner only permissions where the operating system supports them. Only that file can hold a key or a *_BASE_URL. A .env in a project is read for harmless FRONTIER_ tunables only, so a cloned repository cannot redirect your real key. Real environment variables always win over files. See Environment variables.
Commands the agent runs do not inherit your keys. See Permissions.
Logs and crashes
Every log line passes through the redactor before it is written. The log is ~/.frontier/logs/frontier.log, rotated at 5 MB with three older files kept. A crash writes one redacted report to ~/.frontier/crashes/, holding the error, the stack, versions and platform, with your home folder shown as ~. It never holds a prompt, a file's contents or the conversation.
Choose where code can go
{
"privacy": {
"blockedProviders": ["a-provider-name"],
"noTraining": true,
"localOnlyPaths": ["client-secret-project"]
}
}blockedProviders never sends to those providers. noTraining keeps only providers whose data policy is local or no-training. localOnlyPaths keeps only local providers when the working folder or a touched file matches. If nothing is left, the request is refused with PRIVACY_BLOCKED and says why.