npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@veridex/agent-security

v0.1.3

Published

Framework-agnostic agent security gateway — protect any AI agent with Veridex security packs, regardless of framework

Readme

@veridex/agent-security

Framework-agnostic agent security gateway. Protect any AI agent — LangChain, CrewAI, AutoGPT, OpenAI Agents SDK, Veridex, or your own — with versioned security packs that address the OWASP LLM Top 10 and MCP threat model.

Status

Beta. Production-deployed at Veridex. Public API stabilising for 1.0.

Why this package exists

Most agent frameworks treat security as the developer's problem. The result is a long-tail of LLM01–LLM10 failures: prompt injection, tool poisoning, secret exfiltration, runaway spend, confused-deputy handoffs. @veridex/agent-security packages the mitigations as versioned, composable security packs that drop into any agent — Veridex or otherwise — via in-process gateway or HTTP/MCP sidecar.

Installation

npm install @veridex/agent-security
# or
pnpm add @veridex/agent-security

Quick Start

In-process

import { SecurityGateway, createDefaultPacks } from '@veridex/agent-security';

const gateway = new SecurityGateway({ packs: createDefaultPacks() });

const result = await gateway.evaluate({
  agent: { agentId: 'support-1', framework: 'langchain' },
  action: { type: 'tool_call', toolCalls: [{ name: 'bash', arguments: { cmd: 'ls /' } }] },
});

if (result.verdict === 'deny') {
  throw new SecurityError(result.reason);
}

HTTP sidecar (any framework)

import { SecurityClient } from '@veridex/agent-security';

const client = new SecurityClient({
  gatewayUrl: 'http://localhost:3100',
  apiKey: process.env.VERIDEX_SECURITY_KEY!,
  defaultAgent: { agentId: 'crewai-team-1', framework: 'crewai' },
});

const check = await client.checkToolCall('bash', { cmd: 'rm -rf /' });
// → { verdict: 'deny', reason: 'shellCommandSafetyPack: destructive command' }

Framework adapters

import { VeridexLangChainGuard } from '@veridex/agent-security/adapters/langchain';
import { VeridexCrewAIGuard }     from '@veridex/agent-security/adapters/crewai';

// Drop into an existing LangChain executor:
executor.callbacks.push(new VeridexLangChainGuard(gateway));

Security Packs

| Pack | Addresses | What it does | |---|---|---| | injectionDetectionPack | LLM01 (Prompt Injection) | Heuristic + classifier-based detection on untrusted input | | toolPoisoningPack | MCP TPA / LLM05 | Detects hostile instructions in tool descriptions | | secretDetectionPack | LLM02 / LLM10 | Detects secrets in inputs and outputs | | budgetCeilingPack | LLM10 (Unbounded Consumption) | Per-run / per-tenant / per-window spend caps | | shellCommandSafetyPack | LLM05 / Command Injection | Denies destructive shell patterns | | endpointAllowlistPack | Data exfiltration | Restricts outbound HTTP egress | | handoffSafetyPack | Confused Deputy | Validates identity on A2A/ACP handoffs | | piiStrictPack | LLM02 | Denies or redacts PII in tool I/O | | supplyChainPack | LLM06 | Verifies tool signatures and provenance | | canaryCredentialsPack | LLM10 | Plants honeypot creds; emits security event on access | | transparencyLogPack | Audit integrity | Anchors event chain roots to an external log |

Default bundle:

import { createDefaultPacks } from '@veridex/agent-security';

const packs = createDefaultPacks({
  budgetCeiling: { perRunUsd: 5 },
  endpointAllowlist: ['api.stripe.com', 'api.openai.com'],
});

Key Features

Hardened fetch wrapper

import { createSecureFetch } from '@veridex/agent-security';

const fetch = createSecureFetch({
  endpointAllowlist: ['api.openai.com'],
  canaryScan: defaultCanaryScan,           // detects honeypot creds in responses
  tlsValidator: defaultTLSValidator,        // pinning + min version
  onViolation: (v) => logger.warn(v),
});

Token-bucket rate limiting

import { TokenBucketRateLimiter } from '@veridex/agent-security';
const limiter = new TokenBucketRateLimiter({ capacity: 100, refillPerSecond: 10 });
const decision = await limiter.consume({ key: `tenant:${tenantId}`, cost: 1 });

Telemetry

Every verdict emits a structured SecurityTelemetryEvent with a taxonomy field. Route to your SIEM:

import { TelemetryReporter } from '@veridex/agent-security';

const reporter = new TelemetryReporter({
  endpoint: 'https://siem.example.com/ingest',
  apiKey: process.env.SIEM_KEY!,
});

gateway.onEvaluate((event) => reporter.report(event));

Documentation

Comparison

| Capability | @veridex/agent-security | Hand-rolled per-agent | |---|---|---| | Versioned, composable packs | ✅ | rare | | Framework-agnostic gateway | ✅ in-proc + HTTP | usually framework-locked | | Hardened fetch + canary creds | ✅ | rare | | Telemetry → SIEM | ✅ structured | logs | | Adapter for LangChain, CrewAI, MCP | ✅ | DIY |

Ecosystem

License

MIT — see LICENSE.