Privacy
Automatic protection for sensitive files and credentials.
Overview
Coding Friend includes automatic privacy protection that blocks agent access to sensitive files containing credentials, keys, and environment variables.
Protected Files
The privacy-block hook automatically protects:
- All
.envfiles (except.env.example) .pemfiles (certificates and keys).keyfiles (private keys)id_rsaand other SSH identity files.ssh/directory contents
These files are never exposed to the agent, even if explicitly requested.
How It Works
The privacy-block hook runs on every tool use. It scans file paths before they're accessed and blocks any matches automatically.
Disabling Privacy Block
If you need to disable automatic privacy protection (not recommended), set in .coding-friend/config.json:
{
"hooks": {
"privacyBlock": false
}
}
Warning: Disabling privacy protection may expose sensitive credentials to the agent. Only disable if you're working in a isolated, non-production environment.
Best Practices
- Never add
.envfiles to version control (use.env.exampleinstead) - Keep SSH keys (
~/.ssh/) separate from your project directory - Use
.coding-friend/ignorefor additional sensitive patterns - Audit your
.gitignoreto ensure credentials aren't tracked