Skip to content

AI Security · Coding assistants

Protect Sensitive Code in AI-Assisted Development

AI coding assistants can accelerate software development, but developer workflows may also involve source code, configuration files, credentials, and internal technical documentation. GuardStance protects proprietary repositories, API keys, and customer data across Claude Code, Codex, GitHub Copilot, and Cursor—without slowing down your developers.

Book a demo
Repo classes
  • core-banking/ Red · critical The assistant cannot read it Block nothing leaves
  • payments-api/ Yellow · internal Readable, through the gateway Record secrets masked
  • docs-tools/ Green · open Readable Monitor logged

An API key heads for the model.

Data
A function with a live API key
User
Developer using Claude Code
Destination
Anthropic API
Policy
Red repo: no code leaves
Decision
Block reason shown in the terminal

When an AI Coding Tool Receives Sensitive Context

A developer asks an AI assistant to help troubleshoot an application. The request may include source code, configuration values, or internal technical details that should not be shared externally.

GuardStance enforces repository-level access rules and inline secret masking before any prompt or file context leaves the developer's machine.

  • CLI agents

    Claude Code and Codex, through managed hooks.

  • API traffic

    Anthropic and OpenAI API calls, through the AI Gateway.

  • Editor assistants

    GitHub Copilot and Cursor, under the same rules.

Where does it check?

  1. Agent hooks

    Claude Code and Codex hooks check each prompt and each file the agent reads.

  2. AI Gateway

    All Anthropic and OpenAI API traffic leaves through one gateway, with an audit log.

  3. Repo classes

    Red, Yellow and Green repos get their own read and send rules.

  4. Decision engine

    Secrets and personal data are masked. Critical code is blocked, never masked.

What does it cover?

  • Claude Code and Codex

    Managed hooks check prompts, file reads and tool output.

  • AI Gateway

    The single exit for Anthropic and OpenAI API traffic, with an audit log.

  • GitHub Copilot and Cursor

    The same rules for the assistants inside the editor.

  • Repo classes

    Red, Yellow and Green, each with its own rules.

  • Read block on critical repos

    The assistant cannot read a Red repo at all.

  • Fail-closed

    If the decision engine cannot be reached, Red stays blocked.

Questions about coding assistants

Why not mask the code instead of blocking it?

Masking works for literal values such as keys, IBANs and internal host names, and the model barely notices. Renaming the code itself blinds the model, and the answer becomes useless. For critical code the honest decision is to allow it or to block it.

Who is it for?

Banks and other regulated software teams whose developers already use Claude Code, Codex, Copilot or Cursor, and who must show that their own source code and customer data do not leave through those tools.

What does the developer see?

A short message in the terminal or editor that says what was found and which repo or file it came from. Exceptions can be requested, and teams can start in warn-only mode while the rules are tuned.

See it on your own data.

Book a demo