securityagent-core
Shared DLP engine, security skills, and policy enforcement for AI coding agents. Used by SecurityAgent and AgnosticSecurity.
What's inside
| Package | What it does |
|---|---|
endpoint_agent/ |
DLP engine — file blocking (60+ path patterns), confidence-scored content scanning (PII, credentials, semantic disclosure detection) with structural validators (Luhn, SSA rules, entropy) and context-aware scoring, data flow taint tracking (tags sensitive data at ingress, detects at egress via hash/n-gram/substring matching), tool call argument scanning (MCP/function call DLP + taint registry), behavioral monitoring (8-signal anomaly scoring), honeypot traps, credential scanning. LLM intent analysis with llama3.1:8b default + fallback chain. Notebook-aware .ipynb extraction. PDF extraction via 3-tier pipeline (PyMuPDF → Tesseract OCR → pypdf fallback) with encrypted PDF detection |
skills/ |
Agent-agnostic MCP skills — secure_read, secure_exec, analyze_prompt, scan_output, check_policy, get_session_policy, audit_log |
policy/ |
Policy engine — per-session least privilege, behavioral chain detection (11 attack patterns), audit trail with agent attribution. Obsidian vault integration via memory_bridge.py for cross-session policy context |
obsidianMemory/ |
Obsidian vault — daily session logs, second-brain knowledge base, used by memory_bridge.py for persistent threat/policy tracking |
plugin.py |
Standalone CLI entry point + validate_exec(), validate_prompt(), validate_output() pure functions |
Install
pip install git+https://github.com/kaushikdharamshi/securityagent-core.git
# With optional dependencies
pip install "securityagent-core[cloud] @ git+https://github.com/kaushikdharamshi/securityagent-core.git"
pip install "securityagent-core[llm] @ git+https://github.com/kaushikdharamshi/securityagent-core.git"
Usage
Python SDK
from skills.adapters.python_sdk import SecurityAgentSDK
sdk = SecurityAgentSDK(agent_id="my-agent", agent_type="langchain")
# DLP-gated file read
result = sdk.secure_read("/path/to/file")
# Command validation
result = sdk.secure_exec("ls -la")
# Prompt intent analysis
result = sdk.analyze_prompt("Get me all customer SSNs")
MCP Server
python -m skills.adapters.mcp_server # after pip install
Any MCP-compatible client (Claude Code, Copilot, custom agents) can connect via stdio JSON-RPC.
CLI
python -m plugin ~/.env # File read gate
python -m plugin --exec "cat ~/.env" # Exec validation
python -m plugin --prompt "Get all passwords" # Prompt analysis
python -m plugin --skill secure_read --params '{"path":"~/.env"}' # Skills layer
python -m plugin --mcp-server # MCP server
Claude Code Integration
See integrations/claude_code/ for PreToolUse hook configuration.
Tests
pip install -e ".[dev]"
pytest
Metadata
Release files for securityagent-core 4.58.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| securityagent_core-4.58.0.tar.gz | 249.9 kB | Without provenance | Details for securityagent_core-4.58.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| securityagent_core-4.58.0-py3-none-any.whl | Python 3 | none | any | Details for securityagent_core-4.58.0-py3-none-any.whl |
Total release size: 530.5 kB
Release files / securityagent_core-4.58.0.tar.gz
| Download URL | securityagent_core-4.58.0.tar.gz |
|---|---|
| Size | 249.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2d11b65574f98158f25842ab784738d7169b145994d9fee96c7e2bc352d0507e
|
|
BLAKE2b-256 checksum How to use checksums |
5f7b33501c5274ed32599bbb062ef703c10fb2b890c8ac5545abed5ecc7dc2db
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.11
|
Release files / securityagent_core-4.58.0-py3-none-any.whl
| Download URL | securityagent_core-4.58.0-py3-none-any.whl |
|---|---|
| Size | 280.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c34d82b847e28e2659662f7851e1338971cb4e4a26ffb273c2e0b6313debe8fd
|
|
BLAKE2b-256 checksum How to use checksums |
98e684562065f49f9e3e2e0fadb75a7dd02c159a76a2df284293b27dd8f4d1e3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.11
|
Security for securityagent-core 4.58.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.