security
5 questions
- AI
How do I let Claude query my Postgres database?
Run a Postgres MCP server through a read-replica with a role that has only the column-level SELECT grants you actually want, plus row-level security on every multi-tenant table. The npm reference server is archived; vendor a known-good copy or write a thin wrapper.
- AI
How do I stop Claude Code from leaking my .env to a tool call?
Deny rules in .claude/settings.json catch Read(.env*) and the obvious Bash escape hatches (env, printenv, cat .env*, git diff*); a PreToolUse hook adds belt-and-suspenders. Allowlists are cleaner long-term. Auto mode is the place this leaks first.
- AI
How do I run untrusted `npm install` without my SSH keys leaking?
Claude Code's bash tool can run inside an OS-level sandbox (Seatbelt on macOS, bubblewrap on Linux/WSL2) that restricts filesystem and network access. Here's how to enable it, the configuration that matters, and the network-isolation footgun that catches people.
- AI
How do I sandbox Claude Code so a compromised tool call cannot leak my SSH keys?
Enable Claude Code's built-in sandbox, which uses macOS Seatbelt or Linux bubblewrap to restrict filesystem writes to your project directory and block all network traffic except approved domains. Configure allowWrite, denyRead, and allowedDomains to define the exact boundary.
- AI
How do I push Claude Code policy to my whole org when we do not have an MDM?
Use Claude for Teams or Enterprise server-managed settings to deliver JSON policy from claude.ai to every developer's session at startup, without deploying files to devices. Configure permissions, hooks, and autoMode from one place.