@neurosec/sentry
v1.0.15
Published
NeuroShield Sentry — host-level agent protection daemon. Detects and blocks malicious AI agent actions at the OS level.
Maintainers
Readme
NeuroShield Sentry
Host-level agent protection daemon. Detects AI agent processes running on your infrastructure, sandboxes them with kernel-level isolation, and enforces policies on filesystem access, network egress, syscalls, and skill/tool execution.
npm install -g @neurosec/sentry
neuroshield-sentry setup
sudo neuroshield-sentry installHow It Works
The Sentry daemon runs on each host and connects to your NeuroSec security platform:
- Discovery — scans
/proc/*for processes matching agent framework signatures (LangChain, CrewAI, Claude Code, MCP, AutoGen, etc.) - Sandbox — applies cgroups v2 (CPU/memory limits), seccomp (syscall allowlist), and Landlock (filesystem path restrictions) to each agent process
- Enforcement — evaluates every file access, network connection, and syscall against policy. Monitor mode = log-only. Enforce mode = block violations. Quarantine mode = kill on repeat offenses
- Skill Authorization — detects tool definitions from MCP manifests, env vars, and process args. High-risk skills (shell exec, file write, database queries) require approval or are blocked
- Audit — all decisions are logged as JSON Lines with auto-rotation and SIEM-ready format
Quick Start
# Install globally
npm install -g @neurosec/sentry
# Interactive setup (prompts for NeuroSec URL, org ID, token)
neuroshield-sentry setup
# Or non-interactive for automation
neuroshield-sentry setup \
--org=org_abc123 \
--token=nst_yourtoken \
--mode=enforce \
--url=https://api.neurosec.ai
# Install as system service (systemd on Linux, launchd on macOS)
sudo neuroshield-sentry install
# Check status
neuroshield-sentry status
# View real-time enforcement decisions
neuroshield-sentry logs -f
# Start the daemon manually
sudo neuroshield-sentrydCLI Reference
| Command | Description |
|---------|-------------|
| setup | Generate sentry.yaml configuration |
| install | Install system service (systemd/launchd) |
| status | Show daemon status and active processes |
| logs | Tail the audit log (-f to follow, -n 100 for lines) |
| version | Print version |
| help | Show usage |
Local API
When running, the daemon exposes a local HTTP API on 127.0.0.1:9191:
GET /api/v1/status — Daemon status
GET /api/v1/processes — Tagged agent processes
GET /api/v1/processes/:pid — Single process detail
GET /api/v1/decisions — Recent enforcement decisions
GET /api/v1/policy — Active policy
POST /api/v1/policy/reload — Force policy sync
GET /api/v1/approvals — Pending skill approvals
POST /api/v1/approve/:id — Approve a skill invocation
POST /api/v1/deny/:id — Deny a skill invocationRequirements
- Linux (kernel 5.4+ for cgroups v2, seccomp, Landlock) or macOS (Ventura+)
- Node.js >= 20
- Systemd (Linux) or launchd (macOS) for service installation
- Root/sudo access for sandbox (cgroups, seccomp) and
/procscanning
Configuration
Config is at /etc/neuroshield/sentry.yaml. Key settings:
neurosec:
endpoint: "https://api.neurosec.ai"
org_id: "your-org-id"
token_path: /etc/neuroshield/sentry.token
enforcement:
mode: "monitor" # monitor | enforce | quarantineAll settings are also configurable via environment variables (NEUROSEC_ORG_ID, SENTRY_ENFORCEMENT_MODE, etc.)
Platform Backends
| Feature | Linux | macOS | |---------|-------|-------| | Cgroups CPU/memory limits | ✓ cgroups v2 | — | | Seccomp syscall filtering | ✓ BPF | — | | Landlock FS restrictions | ✓ kernel 5.13+ | — | | Seatbelt sandbox profile | — | ✓ sandbox-exec | | Endpoint Security monitor | — | ✓ ES framework | | Process discovery (/proc) | ✓ | limited | | Network monitoring | ✓ nftables/iptables | ✓ pf |
Kubernetes
Deploy as a DaemonSet for per-node enforcement:
kubectl apply -f https://raw.githubusercontent.com/neurosec-ai/neurosec/main/packages/sentry/k8s/daemonset.yaml