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

agentshield-ultimate

v1.1.0

Published

Universal Zero-Trust AI Agent Security Framework: Runtime Enforcement, Skill Scanning, Browser Guard, MCP Protection, and Cryptographic Approvals

Readme

AgentShield Ultimate

Application-Level AI Agent Security SDK, Capability Brokers, and Static Workspace Auditor

AgentShield Ultimate provides:

  1. Universal AI Agent Security Skill (skills/agentshield-ultimate/SKILL.md): Advisory behavioral guidance for coding assistants.
  2. TypeScript Policy SDK & Capability Brokers (src/): Application-level guards, descriptor-checked file broker (SafeFileBroker), socket-pinned HTTP client (NetworkGuard.executePinnedRequest), allowlisted shell: false command executor (CommandGuard.executeSafeCommand), MCP transport proxy (McpRuntimeProxy), and fail-closed human approval engine (ApprovalEngine).

Important Security Boundary Notice: AgentShield Ultimate is a Node.js/TypeScript SDK and CLI. It does not install an OS kernel sandbox, mount namespace, or global syscall interceptor. Unbrokered side effects executed directly by an agent process outside AgentShield wrappers/brokers are not intercepted. Production deployments must pair AgentShield with OS/container isolation and a trusted host runtime.


Implemented Capabilities & Limitations

  • Approval Engine (ApprovalEngine): Requires an explicit host ApprovalAuthenticator (fails closed if absent), binds SHA-256 context digests to actor, actionType, target, recursive sorted parameters, and reason, enforces single-use atomic consumption, supports cancellation, and requires an out-of-band >= 32-byte HMAC key when persistence is enabled (downgrading unconsumed APPROVED requests to PENDING on restart).
  • Filesystem Guard & File Broker (FilesystemGuard, SafeFileBroker): Rejects traversal, null bytes, UNC paths, Windows ADS colons, reserved device names, .agentshield config tampering, and symlink/dangling-symlink escapes via segment-by-segment lstatSync checks. SafeFileBroker uses O_NOFOLLOW (where supported) and lstat/fstat inode matching. Limitation: OS/container mount isolation is still required for kernel-level TOCTOU elimination.
  • Network Guard & Socket Pinning (NetworkGuard): Blocks disallowed schemes, proxies, loopback, RFC-1918, CGNAT, multicast, reserved, link-local, cloud metadata, and IPv4-mapped IPv6 addresses. Synchronous evaluateRequest fails closed on hostnames; evaluateRequestAsync resolves DNS with fail-closed error/empty checks; executePinnedRequest pins resolved IPs at the socket connection, preserves TLS SNI/cert verification, and revalidates every redirect hop.
  • Command Guard & Safe Executor (CommandGuard): Lexical command classifier plus executeSafeCommand enforcing shell: false, explicit executable allowlist (default-deny), blocked shell/script extensions, interpreter flag checks, workspace-confined cwd, sanitized env, and timeouts.
  • Prompt Guard (PromptGuard): Pattern, Unicode bidi/zero-width, Cyrillic/Greek homoglyph, Base64, fake system marker, and quoted-educational context checks, plus encapsulateUntrusted nonce envelopes and a 1 MiB input cap. Limitation: Not a semantic prompt-injection proof.
  • Secret Guard (SecretGuard): Detects and redacts 18 credential/DB-URI/PEM/webhook/OAuth pattern families plus Shannon entropy-assisted detection (calculateEntropy) with a 10 MiB input cap; redacts AuditLogger and SecurityReporter fields.
  • Browser Guard (BrowserGuard): Validates URLs, click href destinations, DOM snapshots, redirect chains, and exports an injectable DOM interception script (createDomGuardScript) for Playwright/Puppeteer/CDP pages. Limitation: Node-only usage does not automatically hook live browser tabs without injecting the script.
  • MCP Guard & Runtime Proxy (McpGuard, McpRuntimeProxy): Audits MCP configs (exact hostname loopback checks, malformed JSON reporting), tool descriptions, and provides McpRuntimeProxy to quarantine poisoned tools and enforce schemas/allowlists on tools/call. Limitation: External unmanaged MCP clients are not intercepted automatically.
  • Audit Logging (AuditLogger): Supports HMAC_SHA256 authenticated hash-chained JSONL logs when configured with a >= 32-byte hmacKey (explicitly reporting UNKEYED_SHA256 / authenticated: false when unkeyed), secret redaction, symlink checks, and rotation retention.
  • Dashboard (DashboardServer): Localhost-only (127.0.0.1), timing-safe token auth, HttpOnly/SameSite=Strict cookies, 30-minute default TTL expiry, session revocation, CSRF validation, and HTML escaping.

Quick Start

npm ci
npm test
npm run typecheck
npm run lint
npm run build

CLI Commands

agentshield init
agentshield scan [--json|--sarif|--md]
agentshield red-team
agentshield fix
agentshield threat-model
agentshield integrations
agentshield policy <strict|balanced|dev>
agentshield dashboard [port]
agentshield version

Supported Agent Integrations

| Agent | Integration Status | Notes | | :--- | :--- | :--- | | Claude Code | SDK_WRAPPER | Requires host tool-call integration (wrapToolExecution / executeProtected) | | Cursor | SDK_WRAPPER | Runtime wrapper only; unbrokered host actions are not intercepted | | OpenAI Codex | SDK_WRAPPER | Function-call wrapper; requires host integration | | LangChain / LlamaIndex | UNIMPLEMENTED_NATIVE | Use wrapToolExecution wrapper | | GitHub Copilot / Windsurf | INSTRUCTIONS_ONLY | Advisory workspace instructions only |


Documentation

License

MIT License. See THIRD_PARTY_NOTICES.md and ATTRIBUTION.md.