DEDUPED Hot AI repos. Real use cases. What people build. Get the Monday 5

How to stop an AI coding agent from reading your .env secrets with Agent Security

Install the local guard so an agent is refused when it reaches for a .env file and every decision is logged.

Short answer: git clone https://github.com/solongate/agent-security.git; then cd agent-security; ./scripts/shell/install.sh. All steps.

Who it is forA developer who lets Claude Code or Codex work in a repo that holds API keys in a .env file and wants the agent blocked from them.

The problemAn agent working in a project can open a .env file and read credentials it does not need for the task.

The outcomeThe agent's attempt to read .env is refused by the guard, the refusal is recorded in the local audit trail, and the agent reports the block instead of working around it.

What you need first

  • A machine where you can run a shell and git (the README installs with git clone and ./scripts/shell/install.sh)
  • Claude Code or Codex installed as the agent you want to guard
  • A new terminal after install, since hooks load only when a session starts
  • For the sandbox use case: Linux with bubblewrap (bwrap) installed, since the README says it is required and macOS and Windows refuse

Steps

  1. git clone https://github.com/solongate/agent-security.git
  2. cd agent-security
  3. ./scripts/shell/install.sh
  4. Open a new terminal, then start Claude Code or Codex in your project.
  5. Ask the agent to read the .env file, then run solongate audit to confirm the refusal was logged.

Prompt for your agent

Install the SolonGate guard from https://github.com/solongate/agent-security by running ./scripts/shell/install.sh in a fresh terminal, then start <agent> in <project-path> and ask it to read the .env file. Expected output: the guard refuses the read and the agent reports the refusal. Verify by running `solongate audit` and confirming a deny entry for .env exists in ~/.solongate/local-logs/solongate-audit.jsonl.

Caveat. The guard only covers agents it hooks into (the README names Claude Code, Codex, OpenCode and Antigravity), and hooks apply only to sessions started after install.

Use this in your AI agent

Ask your agent

Using the Deduped MCP, get the setup steps for solongate/agent-security and "Stop an AI coding agent from reading your .env secrets"

Add Deduped to Claude Code once

claude mcp add --transport http deduped https://dedupedai.com/mcp

Cursor, ChatGPT, others

Share: X LinkedIn Hacker News Email Copy link

Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer