Skip to main content

AgnosticSecurity

DLP for AI coding agents. Stops secrets, credentials, and PII from leaking through Copilot, Claude Code, Cursor, and 17+ LLM providers — before the data leaves your machine.

Version Tests Compliance PyPI HarmBench ASR License


What It Does

  • Makes sensitive data invisible to AI. File gates, context boundaries, and prompt guards ensure your .env files, API keys, and PII never enter an AI context window. If AI never sees it, there is nothing to leak.

  • Catches what other tools miss. 19 detection layers handle base64-encoded exfiltration, split-across-turns attacks, tool call smuggling, memory poisoning, and cross-session taint tracking. 242 detection patterns across 64 attack categories.

  • Works with every AI tool you already use. One install protects Copilot, Claude Code, Cursor, Windsurf, ChatGPT, and LangChain agents simultaneously. No vendor lock-in, no code changes.


Quick Start

pip install securityagent-core
as-init    # auto-detects AI tools, configures protections — 30 seconds

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

Other install methods: Docker | VS Code Extension | Helm | GitHub Action


How It Works

Developer using Copilot / Claude Code / Cursor / ChatGPT / LangChain
  |
  |  AI tries to read .env ──────────── BLOCKED  (file gate, <1ms)
  |  Prompt contains SSN ────────────── BLOCKED  (prompt guard, 10 decoding layers)
  |  Agent runs `curl -d @.env` ─────── BLOCKED  (exec guard + egress allowlist)
  |  @workspace indexes credentials ─── BLOCKED  (context boundary)
  |  LLM response leaks PII ────────── BLOCKED  (output pipeline)
  |  Tool call smuggles data out ────── BLOCKED  (tool call guard + taint tracker)
  |  Memory stores "password is X" ──── BLOCKED  (memory guard)
  |  Base64-encoded exfil in 3 steps ── BLOCKED  (multi-step exfil detector)
  |  External agent probes your API ─── BLOCKED  (6-layer ingress guard)
  |
  └── Everything else ──────────────── Works normally

Key Numbers

Metric Value
Detection patterns 242 across 19 layers (tiered T0/T1/T2)
Attack categories 64/64 covered (100%)
HarmBench ASR sub-3%, 0% false positives, F1 0.98+
Red team agents 55 Docker-isolated agents, 84 events, 100% detection
Compliance 65/65 — OWASP 10/10, NIST 26/26, MITRE 14/14, CSA 15/15
Tests 1,235 across 32 suites (100% pass)
Languages 40 (multilingual prompt injection detection)
LLM providers 17+ supported (OpenAI, Anthropic, Google, Azure, Ollama, ...)
Components 48+

Features

Detection & Prevention

  • File gate — blocks AI from reading .env, .pem, id_rsa, credentials
  • Prompt guard — 10 decoding sublayers (base64, hex, ROT13, unicode, zero-width chars, reversed text, leetspeak, digit reassembly)
  • Exec guard — catches cat ~/.env, curl -d @secrets, obfuscated payloads, netcat/SSH tunnels
  • Context boundary — .copilotignore + search.exclude + LM API interceptor ensures AI never sees sensitive content
  • Terminal Guard v4 — process ancestry tree + input cadence detection separates AI from human terminal commands
  • Output pipeline — scans LLM responses for leaked PII, credentials, semantic disclosure patterns
  • Taint tracking — SHA-256 + n-gram Jaccard similarity detects exfiltration across sessions
  • Tool call guard — DLP + taint scan on MCP/function call arguments
  • Lethal trifecta detector — blocks when private data + untrusted input + external comm all active simultaneously
  • Streaming DLP — real-time scanning of streamed LLM responses
  • Memory scanner — detects trust boundary violations and memory poisoning
  • Injection detection — 242 regex patterns covering SQL injection, SSRF, SSTI, XXE, Log4Shell, deserialization, and more
  • Code fingerprint guard — proprietary code leak prevention via n-gram fingerprinting
  • Vulnerability scanner — OWASP SAST-lite for AI-generated code

Governance & Compliance

  • RBAC — 7 roles (super_admin through developer), team scoping, API key resolution
  • Smart redaction — 4 modes per data type: block, redact (reversible tokenization), mask (partial), allow
  • Privacy mode — full_privacy (local LLM only), balanced, permissive
  • Policy-as-code — YAML policy templates, versioned, org-wide + per-team overrides
  • Alert rules — configurable thresholds and notification channels
  • Compliance scoring — OWASP, NIST AI RMF + 800-53, MITRE ATLAS, CSA ARIA
  • Compliance PDF export — enterprise-styled reports with score cards, per-framework detail, eval metrics
  • Audit backend — PostgreSQL (production) or SQLite (local), immutable SHA-256 checksummed logs
  • Security scorecard — real-time posture assessment across all detection layers

Dashboards (7 pages, unified design system)

  • Dashboard — gateway stats, breach data, DLP blocks, latency metrics
  • Prompt Injection — real-time injection attempt visualization
  • Red Team — attack replay + forensics from Docker harness
  • Events — paginated audit trail with filters (action, model, search)
  • DLP Controls — per-type PII blocking, egress domain allowlist, redaction policy
  • Console — policy management, agent enrollment, RBAC administration
  • Platform — SDK status, cost tracking, system health

Integrations

  • CrowdStrike EDR — IOC push on high-severity blocks
  • Splunk HEC — audit event forwarding
  • Datadog — metrics and event ingestion
  • PagerDuty / OpsGenie — alert escalation
  • Slack / Teams — real-time alert bot
  • WebSocket event feed — live streaming for custom dashboards

CISO Skills (Claude Code slash commands)

8 self-contained security workflows — no code deps, call existing APIs:

Command What It Does
/ciso Executive security briefing with risk assessment
/threat-brief Current threat landscape analysis
/audit-now Run 50-check security audit
/redteam-auto Automated red team exercise
/posture Security posture scorecard
/incident Incident response workflow
/learn-security Interactive security training
/compliance-check Multi-framework compliance validation

Supported AI Tools

AI Tool Protection Method
GitHub Copilot VS Code extension (context boundary + LM API interceptor)
Claude Code Hook-based (PreToolUse + UserPromptSubmit, 4-layer pipeline)
Cursor .cursorignore + VS Code extension
Windsurf .aiignore + VS Code extension
ChatGPT, Claude.ai, Gemini, Grok, Perplexity, DeepSeek Chrome extension (DLP for web LLM interfaces)
LangChain / Autogen Auto-instrumentation SDK (zero-code)
Any LLM provider API Gateway with input/output security pipelines

Installation

Method Command Best For
PyPI pip install securityagent-core && as-init Individual developers
Docker docker compose up Full stack (gateway + breach engine + proxy)
VS Code Install .vsix from Releases Copilot / Cursor users
Chrome Load unpacked from chrome-extension/ ChatGPT / Claude web users
Pre-commit bash hooks/install.sh Git-level scanning
GitHub Action See below CI/CD pipeline
Helm helm install agsec helm/agnosticsecurity/ Kubernetes production

GitHub Action

name: AgnosticSecurity Scan
on: [pull_request]

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

Architecture

                         +------------------+
                         |   Developer IDE  |
                         | (VS Code/Cursor) |
                         +--------+---------+
                                  |
              +-------------------+-------------------+
              |                   |                   |
     +--------v--------+ +-------v--------+ +--------v--------+
     |  VS Code Ext    | | Claude Code    | | Chrome Ext      |
     |  Context boundary| | Hooks (4-layer)| | Web LLM DLP     |
     +---------+--------+ +-------+--------+ +--------+--------+
              |                   |                   |
              +-------------------+-------------------+
                                  |
                         +--------v---------+
                         |   API Gateway    |    Port 8000
                         |  (Smart Router)  |
                         +--------+---------+
                                  |
              +-------------------+-------------------+
              |                   |                   |
     +--------v--------+ +-------v--------+ +--------v--------+
     | Input Pipeline  | | Output Pipeline| | Ingress Guard   |
     | DLP + injection | | PII + redaction| | 6-layer defense |
     | + guardrails    | | + de-tokenize  | | + risk scoring  |
     +--------+--------+ +-------+--------+ +--------+--------+
              |                   |                   |
              +-------------------+-------------------+
                                  |
                    +-------------+-------------+
                    |                           |
           +--------v--------+        +--------v--------+
           |  Breach Engine  |        |  Audit Backend  |
           |  Classification |        |  PostgreSQL/    |
           |  + Compliance   |        |  SQLite         |
           +-----------------+        +-----------------+

Testing

source .venv/bin/activate

# Quick validation
python3 scripts/smoke_test.py            # 31 tests — file gate + content DLP
python3 scripts/test_red_team.py         # 52 tests — adversarial attacks

# 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

# Full suite: 1,235 tests across 32 files — see CLAUDE.md for complete list

Privacy

  • Runs on your machine — no telemetry, no analytics, no cloud dependency
  • Pluggable LLM — local Ollama (air-gapped), Anthropic, or OpenAI for optional semantic analysis
  • Privacy mode — full_privacy locks to local models only; balanced allows cloud with DLP; permissive logs only
  • Audit logs stored locally — SHA-256 checksummed, tamper-detected

Documentation

Document Description
Security Design Threat model, design decisions, failure modes
OWASP LLM Mapping Control-to-risk compliance mapping
Admin Console Policy management architecture
Enterprise RBAC Role-based access control design
Memory Agent Threats Memory poisoning, trust boundaries
Competitive Analysis vs Lakera, Protect AI, Prompt Security, HiddenLayer

Contributing

git clone https://github.com/secure-mind-live/AgnosticSecurity.git
cd AgnosticSecurity
python3 -m venv .venv && source .venv/bin/activate
pip install -e .
python3 scripts/smoke_test.py   # verify setup

PRs welcome. All contributions run through the security hook — if it blocks your action, adjust your approach.


License

Business Source License 1.1 (BSL-1.1). Free for non-production use. See LICENSE for details.

Metadata

Release files for agnostic-security 4.60.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for agnostic-security 4.60.0
File Size Uploaded Provenance Actions
agnostic_security-4.60.0.tar.gz 244.5 kB Without provenance Details for agnostic_security-4.60.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for agnostic-security 4.60.0
File Interpreter ABI Platform Actions
agnostic_security-4.60.0-py3-none-any.whl Python 3 none any Details for agnostic_security-4.60.0-py3-none-any.whl

Total release size: 487.2 kB

Release files / agnostic_security-4.60.0.tar.gz

Download URL agnostic_security-4.60.0.tar.gz
Size 244.5 kB
Tags Source
SHA-256 checksum
How to use checksums
7d6107bc55f287c0f77ffffc12f35c7be05f9ee10c47bb22d7d98c887a0b0d66
BLAKE2b-256 checksum
How to use checksums
685e3156339b6a11f7ab30a73dc550ff7680d2fbefe03da56b0dd28f522d5fda
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.11

Release files / agnostic_security-4.60.0-py3-none-any.whl

Download URL agnostic_security-4.60.0-py3-none-any.whl
Size 242.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f618013fb22e8f68782c209d192db514a5672111b4a3d701cc2c82aaf1cd7ca8
BLAKE2b-256 checksum
How to use checksums
122f7ce27780500e1e2c1b180aefc5673b26bd72b21414775a15cc7d7e80e438
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.11

Security for agnostic-security 4.60.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

4.60.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page