Is Claude Code safe to use?

Claude Code reads your repo, edits files, runs shell commands and calls MCP tools. That's what makes it useful, and it's also what makes it a security surface no IDE assistant ever was. Its built-in permissions, sandboxing and managed settings reduce the risk meaningfully. They don't remove it.

What are your best practices to secure your ?

Hi! I'm Florentin, co-founder of d. I enjoy using CC, but let's be honest, it still has some security issues.

Weak approval and permission governance, prompt injection, over-permissioned MCP servers and tool poisoning... I recently run a technical deepdive on how its security model works, their main risks, and some best practices. [1] I dropped them here as a TL,DR, hope it helps!

Best practices to secure your Claude Code

  1. Run in isolated, least-privilege environments.

  2. Apply least privilege to permissions and tools.

  3. Keep a human in the loop on generated code.

  4. Manage secrets out of reach.

  5. Govern dependencies and packages.

  6. Audit permission configurations on a schedule.

  7. Control auto and bypass modes.

  8. Log and monitor at the team level.

  9. Set policy by repository and environment sensitivity.

  10. Secure the agent at prompt time

Any additional best practices to secure your ? Anything your agent did that scared you lately? Let's chat!

[1] Is Claude Code Safe to Use? Security Risks, Controls and Best Practices

42 views

Add a comment

Replies

Best

The point about keeping secrets out of reach really stood out to me. It’s easy to overlook that when setting things up.

One more control I’d add is job-level scope before Claude touches the repo.

```bash

npx -y martin-loop@latest preflight "make the approved change" --verify "npm test" --allow-path "src/**" --allow-path "tests/**" --deny-path ".env*" --budget-usd 3 --max-iterations 2

```

If it passes, switch to `run`. Then check `npx -y martin-loop@latest runs verify --latest`.

I built MartinLoop to put scope, stop conditions and evidence around coding-agent runs. It’s open source.