Catalog PyPI
PACKAGE EXPLORERView in registry

agnostic-security

PyPI

The firewall for AI coding agents — prevents secrets, PII, and credentials from leaking through Copilot, Claude Code, Cursor, and LangChain

ai-agentsclaude-codecopilotcredentialscursordata-loss-preventiondevsecopsdlpguardrailllmpiisecretssecuritywindsurf
Versions collected1
Direct dependencies8From release 4.54.0
Last observed21 Oct, 09:18 UTC

README

Version 4.54.0 documentation

AgnosticSecurity

The firewall for AI coding agents. Prevents secrets, credentials, and PII from leaking through Copilot, Claude Code, Cursor, and LangChain — before the data ever leaves your machine.

Tests Red Team ASR FPR


Your AI coding assistant has read access to your entire codebase — .env files, API keys, SSH keys, customer PII. There are zero guardrails. AgnosticSecurity is that guardrail.


Quick Start

Prerequisites: Python 3.11+, Docker (optional), Ollama (optional)

# Option 1: Install from PyPI
pip install securityagent-core
as-init   # auto-detects your AI tools and configures protections

# Option 2: From source
git clone https://github.com/secure-mind-live/AgnosticSecurity.git
cd AgnosticSecurity
pip install -e .
as-init

# Option 3: Docker (full stack — gateway + breach engine + LLM proxy)
docker compose up

# Option 4: Just the VS Code extension
code --install-extension vscode-extension/agnostic-security-*.vsix

That's it. Your .env files, credentials, and PII are now protected from every AI tool in your environment.


What It Does

Your code editor (VS Code / Cursor / Windsurf)
  │
  │  ── AI tries to read .env ──────────── BLOCKED (file gate)
  │  ── AI autocompletes a secret ──────── BLOCKED (context boundary)
  │  ── @workspace indexes credentials ─── BLOCKED (search.exclude)
  │  ── Prompt contains SSN ────────────── BLOCKED (prompt guard)
  │  ── Agent runs `curl -d @.env` ─────── BLOCKED (exec guard)
  │  ── LLM response leaks PII ────────── BLOCKED (output scan)
  │  ── Memory stores "password is X" ──── BLOCKED (memory guard)
  │  ── Tool call smuggles data out ────── BLOCKED (tool call guard)
  │  ── AI bulk-edits .env (15+ lines) ── REVERTED (AI-vs-human detection)
  │
  └── Everything else ──────────────────── Works normally

Key insight: We don't block AI from editing files (that's a losing game). We make sensitive data invisible to AI at every layer — if AI never sees the data, there's nothing to leak.


Protection Layers

LayerWhat It StopsSpeed
File gateAI reading .env, credentials, keys<1ms
Context boundaryAI seeing sensitive file content (.copilotignore, search.exclude, LM API interceptor)0ms
Terminal Guard v4AI agents running cat .env in terminal — process ancestry tree + input cadence detection (AI vs human typing), bash + zsh support, command wrappers can't be bypassed (humans pass freely)<1ms
Exec guardcat ~/.env, curl -d @secrets, obfuscated exfiltration, netcat/SSH tunnels<1ms
Prompt guard"Show me all API keys", PII in prompts, 10 encoding evasion layers (base64, hex, ROT13, unicode, zero-width chars, reversed text, leetspeak)<50ms
Output scanLLM responses containing leaked PII/credentials<1ms
Taint trackingData exfiltration across sessions (SHA-256 + n-gram Jaccard)<1ms
Memory guardMemory poisoning ("user authorized all exports"), trust boundary violations<1ms
Tool call guardMCP tools smuggling data in arguments<1ms
Egress allowlistcurl to unauthorized external domains<1ms
Lethal trifectaPrivate data + untrusted input + external comm all active simultaneously<1ms
Ingress guardMalicious external agents probing your APIs (7-layer: fingerprint, behavior, risk, reputation, policy, headers, DLP controls)<5ms
DLP controlsRuntime per-type PII blocking (SSN, credit card, API keys, JWTs) via REST API<1ms
Enterprise privacyOrg-wide policy push, per-team overrides, scheduled mode changes (full_privacy during market hours, balanced after-hours), policy inheritance hierarchy<1ms
Model usage reportingVS Code reports which AI models devs use to gateway — auto-proxy routes all LLM traffic through DLP0ms
Vuln scannerSQL injection, XSS, command injection in AI-generated code<10ms
Code fingerprintProprietary code leaking to cloud LLMs<10ms

Works With Everything

AI ToolHow
GitHub CopilotVS Code extension (context boundary + LM API interceptor)
Claude CodeHook-based (PreToolUse + UserPromptSubmit)
Cursor.cursorignore + VS Code extension
Windsurf.aiignore + VS Code extension
ChatGPT / Claude.ai / Gemini / Grok / Perplexity / DeepSeek / Meta AI / HuggingChatChrome extension (DLP for web LLM interfaces, India PII support: Aadhaar, PAN Card, Indian phone)
LangChain / AutogenAuto-instrumentation SDK (zero-code monkey-patching)
Any LLM providerAPI Gateway with input/output security pipelines

Any LLM provider works — OpenAI, Anthropic, Google, Azure, local Ollama. Security shouldn't depend on your model choice.


Installation Options

MethodCommandBest For
CLI installerpip install -e . && as-initIndividual developers
Pre-commit hooksbash hooks/install.shTeams wanting git-level protection
GitHub ActionAdd workflow YAML (see below)CI/CD pipeline scanning
Dockerdocker compose upFull stack deployment
VS Code extensionInstall .vsix from ReleasesCopilot/Cursor users
Chrome extensionLoad unpacked from chrome-extension/ChatGPT/Claude/Gemini web users
Kuberneteshelm install agsec helm/agnosticsecurity/Production deployments

Architecture

Developer using Copilot / Claude Code / Cursor / LangChain
  │
  ├── VS Code Extension ──────── Context boundary — data never enters AI context
  │                                ├── .copilotignore / .cursorignore / .aiignore
  │                                ├── search.exclude (blocks @workspace)
  │                                ├── LM API interceptor (scans all prompts)
  │                                └── @security / @guard chat participants
  │
  ├── Chrome Extension ──────── DLP for web AI tools (ChatGPT, Claude, Gemini, Grok, Perplexity, DeepSeek, Meta AI, HuggingChat)
  │
  ├── Claude Code Hooks ──────── PreToolUse (Read/Edit/Write/Bash) + UserPromptSubmit
  │                                └── 4-layer: PII regex → intent → Pydantic → LLM
  │
  ├── Ingress Guard ──────────── 7-layer external agent defense
  │                                └── Fingerprint → behavior → risk → reputation → policy → headers → DLP controls
  │
  ├── API Gateway + LLM Proxy ── Input/output security pipelines
  │                                ├── PII redaction + injection detection
  │                                ├── Base64 decode + credential detection + multi-step exfil blocking
  │                                ├── DLP-to-breach engine bridge (auto-escalation)
  │                                ├── Smart Router (5 strategies, 14 models, 4 providers)
  │                                ├── Unified single-port dashboard (/dashboard + /unified + /console)
  │                                └── Cost tracking + block rules
  │
  ├── Effect-Layer Defenses ──── Taint tracking, egress allowlist, lethal trifecta,
  │                                tool call guard, code fingerprint, vuln scanner,
  │                                shadow AI detector, privacy mode, knowledge graph
  │
  ├── Red Team Harness ──────── 55 attack agents in Docker, 100% detection rate
  │
  └── Breach Compliance ──────── Rule-based classification (<1ms, no LLM)
                                   ├── 13 fintech breach types (PCI-DSS, SOX, HIPAA)
                                   ├── Immutable SHA-256 audit log
                                   ├── Agent registration (email-verified)
                                   ├── Admin Console (RBAC, policy versioning)
                                   └── Real-time dashboard

Compliance

All controls mapped to industry frameworks with automated scoring:

  • OWASP Top 10 for LLM Applications — python3 scripts/owasp_score.py
  • NIST AI Risk Management Framework — python3 scripts/nist_score.py
  • MITRE ATLAS — coverage across 274-attack red-team suite + 55-agent Docker harness
  • 50-check security audit — python3 scripts/audit.py

Testing

942 automated tests across 28 suites, plus a Docker-based red-team harness:

source .venv/bin/activate

# Core tests (run any individually)
python3 scripts/smoke_test.py                 # 31 — file gate + content DLP
python3 scripts/test_red_team.py              # 52 — adversarial red-team
python3 scripts/test_pii_prompt_guard.py      # 18 — PII evasion
python3 scripts/test_outbound_guards.py       # 42 — obfuscation + egress
python3 scripts/test_ingress_guard.py         # 54 — ingress guard

# Red team Docker harness (55 agents, 10 OWASP categories)
docker compose -f docker-compose.redteam.yml up --build -d
docker exec agsec-attacker python3 /agents/run_all.py

# Continuous red-teaming with HTML reports
python3 scripts/continuous_red_team.py
python3 scripts/red_team_report.py

Privacy

  • Runs entirely on your machine — no telemetry, no analytics, no cloud dependency
  • Pluggable LLM backend — use local Ollama (air-gapped), Anthropic, or OpenAI for optional semantic analysis
  • Privacy mode — one-command killswitch for cloud LLM access (EA_PRIVACY_MODE=full_privacy), enterprise policies with org-wide/per-team overrides and scheduled mode changes
  • Audit logs stored locally — SHA-256 checksummed, tamper-detected, JSONL archived

GitHub Action

# .github/workflows/security.yml
name: AgnosticSecurity Scan
on: [pull_request]

jobs:
  scan:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: kaushikdharamshi/AgnosticSecurity/.github/actions/security-scan@main
        with:
          severity-threshold: HIGH
          fail-on-findings: true
          scan-dlp: true
          scan-vulns: true

25 Components

ComponentWhat It Does
DLP EngineFile gate + content scanning + exec guard + prompt analysis
API GatewayFastAPI proxy with input/output security pipelines, base64 decode + credential detection + multi-step exfil blocking
LLM ProxyReverse proxy with cost tracking + block rules
Breach EngineRule-based breach classification + immutable audit log
VS Code ExtensionContext boundary for Copilot/Cursor/Windsurf + model usage reporting + auto-proxy mode
Chrome ExtensionDLP for ChatGPT/Claude/Gemini/Grok/Perplexity/DeepSeek/Meta AI/HuggingChat web + India PII
Auto-Instrumentation SDKZero-code LangChain/Autogen monitoring
Smart RouterTask classification + 5 routing strategies + failover
Admin ConsoleCentralized policy management + agent enrollment + RBAC
Ingress Guard7-layer external agent defense middleware
DLP Controls APIRuntime per-type PII blocking via REST API
Privacy Mode3 enforced modes (local-only / balanced / permissive)
Knowledge GraphAgent-threat-incident relationship tracking
Vuln ScannerOWASP SAST-lite for AI-generated code
Code Fingerprint GuardProprietary code leak prevention
Shadow AI DetectorDiscovers 12+ unauthorized AI tools
Security Memory BridgeObsidian-compatible security event vault
Data Flow Taint TrackerCross-session SHA-256 + n-gram Jaccard exfil detection
Lethal Trifecta DetectorBlocks MCP tools when private data + untrusted input + external comm all active
Tool Call GuardDLP + taint scan on MCP/function call arguments
CLI Installeras-init auto-detects AI tools, configures protections
Red Team Harness55 attack agents, 10 OWASP categories, Docker-isolated
DLP-Breach BridgeAuto-escalates DLP violations to the breach engine for compliance classification
Gateway API HardeningBase64 decode, credential detection, multi-step exfil blocking on all gateway endpoints
Unified DashboardSingle-port dashboard serving SOC view, admin console, and hook audit from one gateway
Model Usage ReporterVS Code extension reports which AI models devs use; auto-proxy routes all LLM traffic through DLP

Competitive Positioning

                    Pre-commit  In-IDE   AI Runtime   Post-incident  CI/CD    Browser   Inbound
                    (hooks)     (live)   (agent layer) (detection)   (Action) (web LLMs) (API defense)
GitGuardian         ========    ....     ........     ========       ======== ......    ........
Snyk                ........    ======== ........     ========       ======== ......    ........
Semgrep             ========    ======== ........     ........       ======== ......    ........
Prompt Armor        ........    ....     ========     ........       ........ ......    ........
Lakera Guard        ........    ....     ========     ........       ........ ......    ........
AgnosticSecurity    ========    ======== ========     ========       ======== ========  ========
                                         ^^^^^^^^                             ^^^^^^^^  ^^^^^^^^
                                         SHARED                               ONLY US   ONLY US

Configuration Reference

Environment variables

DLP Engine

VariableDefaultDescription
EA_LLM_PROVIDERollamaLLM provider for semantic analysis (ollama, anthropic, openai)
EA_PRIVACY_MODEbalancedPrivacy mode (full_privacy, balanced, permissive)
EA_ALLOWED_DOMAINS—Comma-separated egress allowlist
EA_LETHAL_TRIFECTA1Enable lethal trifecta detector
EA_INGRESS_GUARD1Enable ingress guard
EA_CODE_GUARD_ENABLED1Enable code fingerprint guard
EA_SHADOW_AI_ENABLED1Enable shadow AI detector
EA_KNOWLEDGE_GRAPH_ENABLED1Enable knowledge graph
EA_DLP_CONFIDENCE_THRESHOLD0.5Minimum confidence to flag PII

Gateway

VariableDefaultDescription
GATEWAY_API_KEYSsk-gateway-changemeComma-separated client API keys
OPENAI_API_KEY—OpenAI API key
ANTHROPIC_API_KEY—Anthropic API key
RATE_LIMIT_RPM60Max requests per minute per key

VS Code Extension

SettingDefaultDescription
agnosticsecurity.enabledtrueMaster toggle
agnosticsecurity.autoDisableCopilottrueDisable Copilot for sensitive files
agnosticsecurity.sensitiveFileGlobs[defaults]Custom sensitive file patterns

Key Documents

DocumentWhat It Covers
Security DesignThreat model, design decisions, failure modes
YC ApplicationProduct positioning, market, competitive landscape
OWASP LLM MappingControl-to-risk compliance mapping
Admin Console DesignPolicy management architecture
Memory Agent ThreatsMemory poisoning, trust boundaries
GTM StrategyGo-to-market plan, partnerships, content
Competitive Analysisvs Lakera, Protect AI, Prompt Security, HiddenLayer

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Versions 1

Collected releases
VersionPublishedDirect dependenciesOpen version
4.54.021 Oct 20268

Package advisories

0
No matching advisories collected

This describes our collected data; it is not a security assessment.

Repository

PENDING
secure-mind-live/agnosticsecurity

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 21 Oct, 09:18 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package:dc706b878857126452b6443ac920ffa9597bc5005ea323295e71f36987b1903c