Skip to main content
Glama

Keep secret values out of AI coding agents.

Fida is a local-first secret leak prevention layer for AI coding agents. It finds exposed credentials, gives agents redacted safe views of sensitive files and command output, and shows whether your installed agent integrations can still expose a raw value.

It is deliberately not a general agent policy engine, approval system, or developer workflow firewall. Fida does not decide which ordinary commands an agent may run, which files it may edit, or whether you may use curl | sh. Its one job is simple: a detected secret must not reach model context.

Project status: MVP implemented. Fida installs local integrations, verifies its redaction path with a synthetic credential, scans repo risk, and records redaction-safe audit events.

Quick start

# Install the binary. In a terminal it offers to set up protection right away.
curl -fsSL https://raw.githubusercontent.com/ajipurn/fida/main/install.sh | sh

# Run fida with no arguments any time to set up — or, once installed, to update.
fida

# Check coverage, including how many secrets have been protected.
fida status

fida is install-and-forget: it wires every coding agent it detects, and running it again later checks for an update. Run from a terminal, the installer offers to do this for you; piped or in CI it stays quiet and just prints fida as the next step.

Related MCP server: ContextLock

What Fida does

When an agent needs content that may contain a credential, Fida provides a sanitized view instead of the raw bytes:

Agent -> fida_read .env -> scan -> redact -> agent

API_URL=https://example.test
API_KEY=[REDACTED]

Its integrations combine three layers:

  1. Redacting MCP gateway — fida_read and fida_shell return redacted file content and captured command output. fida_shell still runs the real command — the child process keeps the true credential, so the work succeeds — and redacts only the output handed back to the model: the agent uses a secret without seeing it. File reads are confined to the workspace by default, with optional explicit read roots for trusted user attachments; secrets outside those roots (e.g. ~/.aws) are covered only by the native-read hook on enforced agents.

  2. Agent steering — a managed instruction tells the agent to use those redacting tools whenever it needs sensitive content.

  3. Native-read hook, where supported — Codex and Claude Code can block a native read only when Fida detects secret content that the native tool cannot redact, then direct the agent to the gateway.

Normal clean reads, edits, commands, installs, network access, and approvals remain the agent's and developer's concern. Fida's gateway follows the same low-friction rule: it captures and redacts output; it does not apply a command allowlist or repository approval policy.

What Fida detects

The built-in detector catalog recognizes dotenv assignments, PEM private keys, and high-precision formats for AWS, GitHub, Google, Slack, Stripe, OpenAI, Anthropic, and JWT credentials. It favors precision over recall: a credential in a format Fida does not recognize passes through unredacted. This is best-effort protection against accidental exposure, not a guarantee of zero leakage. Use a dedicated history scanner such as gitleaks or GitGuardian alongside Fida.

Fida fails closed on redaction: if it cannot prove a response is clean, it suppresses that response rather than returning a partial secret.

Install

curl -fsSL https://raw.githubusercontent.com/ajipurn/fida/main/install.sh | sh

The binary is installed to ~/.local/bin by default. Run in an interactive terminal, the installer then offers to wire protection for you; otherwise start setup yourself:

fida

Pin a version or choose another install directory:

FIDA_VERSION=v0.1.0 FIDA_INSTALL_DIR=/usr/local/bin \
  curl -fsSL https://raw.githubusercontent.com/ajipurn/fida/main/install.sh | sh

Other options:

cargo install --git https://github.com/ajipurn/fida fida-cli

git clone https://github.com/ajipurn/fida
cd fida
./install.sh

Everyday commands

fida                  # protect every detected agent (or, once installed, update)
fida on [agent]       # protect one agent, or all detected agents
fida off [agent]      # remove protection from one agent, or all of them
fida status           # coverage + how many secrets have been protected
fida scan             # find secret risk without printing secret values
fida scan --fail-on high

fida scan reports whether a raw secret could reach a detected agent. It never prints a secret value, its length, or a fragment of it.

Agent coverage

Agent

Coverage

Codex, Claude Code

enforced when the hook and gateway self-test pass

Cursor, OpenCode, GitHub Copilot, Windsurf, Antigravity, Kiro

best_effort gateway + steering

fida status reports the actual state for each detected agent: enforced, best_effort, incomplete, or inactive.

Scope and limits

Fida protects model-bound content on its installed integration paths. It is not an OS sandbox or a complete data-loss-prevention product. An agent that can ignore steering, bypass a hook, or access a file through an unmediated native tool may still need OS-level containment. Fida names that coverage honestly instead of turning ordinary development into a permission maze.

Development

cargo fmt --all --check
cargo clippy --workspace --all-targets -- -D warnings
cargo test --workspace

Security

Please report security-sensitive issues privately when they could expose a secret, bypass redaction, or misrepresent protection coverage. See SECURITY.md.

License

Licensed under the terms in LICENSE.

Available Tools

2 tools
fida_readA

Read a file's text through Fida policy (files.read). Use this for every file read, ahead of native reads, workspace context, reviewed-file context, lean-ctx/ctx_read, or other MCP file tools, so policy can block denied paths and secret values in returned content are redacted.

Inputs: path (required).

fida_shellA

Run a command through Fida policy (commands.run). Use this instead of native shell execution or non-Fida MCP shell tools so the policy can gate the command. Stdout/stderr are returned with secrets redacted.

Inputs: command (required), cwd.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.1/5.0

    Scored across 2 tools

    Disambiguation5/5

    The two tools have clearly distinct purposes: fida_read handles file reads, fida_shell handles command execution. There is no overlap in functionality.

    Naming Consistency5/5

    Both tools follow a consistent pattern: 'fida_' prefix + verb (read, shell). This is a predictable and uniform naming convention.

    Tool Count3/5

    With only 2 tools, the server is very minimal. While it may cover essential file read and shell execution, it feels thin for a security policy tool that could include more operations.

    Completeness2/5

    The server lacks write, delete, or policy management tools. For a policy-enforcing tool, there are notable gaps such as file writes or policy listing, which would be expected.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      C
      maintenance
      A local-first MCP safety layer that blocks dangerous files and redacts secrets before AI agents can access them, ensuring safe vibe coding.
      7 npm
      Apache 2.0
    • A
      license
      Not graded
      quality
      B
      maintenance
      A local-first MCP server that lets AI agents use gated APIs without holding keys, enforcing declarative policies, injecting secrets server-side, and auditing access without content.
      684 npm
      3
      Apache 2.0
    • A
      license
      Not graded
      quality
      C
      maintenance
      Local CLI and MCP server that redacts secrets from logs, files, and diffs before sending them to AI agents, with stable placeholders and token-budgeted truncation.
      MIT