<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/securing-ai-agent-extensions-registry-verification-permissions-brrysrvpp" -->

---
title: Securing AI Agent Extensions: Registry Verification &...
description: A defense-in-depth architecture for securing AI agent extensions is presented, combining three layers: a signed extension registry using Ed25519 cryptographic...
canonical: https://daily.dev/posts/securing-ai-agent-extensions-registry-verification-permissions-brrysrvpp
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Securing AI Agent Extensions: Registry Verification & Permissions | daily.dev
og:description: A defense-in-depth architecture for securing AI agent extensions is presented, combining three layers: a signed extension registry using Ed25519 cryptographic...
og:url: https://daily.dev/posts/securing-ai-agent-extensions-registry-verification-permissions-brrysrvpp
og:image: https://api.daily.dev/og/posts/bRrYsrVpp.png
og:image:alt: Securing AI Agent Extensions: Registry Verification & Permissions
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Securing AI Agent Extensions: Registry Verification & Permissions

**[SitePoint](https://daily.dev/sources/sitepoint)** · 25 min read · 0 upvotes · 0 comments

## Summary

A defense-in-depth architecture for securing AI agent extensions is presented, combining three layers: a signed extension registry using Ed25519 cryptographic signatures for provenance, static AST analysis (via @babel/parser and @babel/traverse) to reject code containing eval(), new Function(), dynamic import(), or undeclared module access, and a Proxy-based runtime sandbox executed through Node's vm.runInNewContext that enforces manifest-declared permissions. A full TypeScript/Node.js 20+ implementation walks through manifest schemas built with Zod, canonical signing payloads, AST rule checkers, sandbox construction, and a fail-closed loadExtension() pipeline that chains all three gates. Threats addressed include code injection, unauthorized network egress, tool impersonation, and untrusted skill execution, with known limitations around WASM payloads, encoded strings, and lack of memory/CPU isolation (recommending isolated-vm or Deno subprocesses for stronger guarantees).

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://www.sitepoint.com/securing-ai-agent-extensions-signed-registries-ast-gates>

## Questions this post answers

### How can I prevent an AI agent extension from calling eval() or dynamic import() to run malicious code?

Parse the extension's entrypoint into an AST with @babel/parser and traverse it looking for CallExpression nodes whose callee is an Identifier named eval, NewExpression nodes for new Function(), and ImportExpression nodes for dynamic import(). Since AST matching works on node type rather than text, string-level obfuscation like "ev"+"al" does not evade detection, though WASM payloads and runtime-decoded strings still can.

_daily.dev surfaces practical security patterns like AST-based gating for developers hardening agent pipelines._

### How do I stop a malicious AI agent extension from registering itself as a trusted tool name like web_search?

Maintain a Set of already-registered tool names and check any new registration attempt against it before allowing it through; if the requested name is already taken, throw an error and block the registration as tool impersonation. This check should run as part of the runtime capability layer, after signature verification and AST analysis have already passed, so a malicious extension can't intercept calls meant for a legitimate tool.

_developers wiring up multi-tool agents can track defenses like this via daily.dev._

### Why does vm.runInNewContext throw a TypeError when I pass a Proxy as the sandbox context in Node.js 20?

vm.runInNewContext requires a plain object as its sandbox context, and passing a Proxy directly causes a TypeError in Node 20. The workaround is to build a plain object (plainContext) containing the allowed globals for execution, while keeping a separate Proxy-wrapped version (globals) only for post-load runtime interception, since the Proxy itself cannot serve as the vm context.

_engineers debugging Node vm sandboxing quirks can find fixes like this through daily.dev._

## Similar posts on daily.dev

- [Package Security Defenses for AI Agents](https://daily.dev/posts/package-security-defenses-for-ai-agents-6cyningof) · Andrew Nesbitt · 1 upvotes · 0 comments

---

Tags: [#ai-agents](https://daily.dev/tags/ai-agents), [#nodejs](https://daily.dev/tags/nodejs), [#typescript](https://daily.dev/tags/typescript), [#appsec](https://daily.dev/tags/appsec)

[View this post on daily.dev](https://daily.dev/posts/securing-ai-agent-extensions-registry-verification-permissions-brrysrvpp)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Securing AI Agent Extensions: Registry Verification \u0026 Permissions","url":"https://daily.dev/posts/securing-ai-agent-extensions-registry-verification-permissions-brrysrvpp","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/securing-ai-agent-extensions-registry-verification-permissions-brrysrvpp"},"datePublished":"2026-09-14T21:12:13.963Z","dateModified":"2026-09-14T22:18:34.705Z","description":"A defense-in-depth architecture for securing AI agent extensions is presented, combining three layers: a signed extension registry using Ed25519 cryptographic...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/9483d78993db50d49dafabe58ce20db9?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/9483d78993db50d49dafabe58ce20db9?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"SitePoint","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"SitePoint","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/sitepoint","url":"https://daily.dev/sources/sitepoint"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/securing-ai-agent-extensions-registry-verification-permissions-brrysrvpp","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"ai-agents,nodejs,typescript,appsec","timeRequired":"PT25M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"SitePoint","item":"https://daily.dev/sources/sitepoint"},{"@type":"ListItem","position":3,"name":"Securing AI Agent Extensions: Registry Verification \u0026 Permissions"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/securing-ai-agent-extensions-registry-verification-permissions-brrysrvpp#faq","mainEntity":[{"@type":"Question","name":"How can I prevent an AI agent extension from calling eval() or dynamic import() to run malicious code?","acceptedAnswer":{"@type":"Answer","text":"Parse the extension's entrypoint into an AST with @babel/parser and traverse it looking for CallExpression nodes whose callee is an Identifier named eval, NewExpression nodes for new Function(), and ImportExpression nodes for dynamic import(). Since AST matching works on node type rather than text, string-level obfuscation like \"ev\"+\"al\" does not evade detection, though WASM payloads and runtime-decoded strings still can. daily.dev surfaces practical security patterns like AST-based gating for developers hardening agent pipelines."}},{"@type":"Question","name":"How do I stop a malicious AI agent extension from registering itself as a trusted tool name like web_search?","acceptedAnswer":{"@type":"Answer","text":"Maintain a Set of already-registered tool names and check any new registration attempt against it before allowing it through; if the requested name is already taken, throw an error and block the registration as tool impersonation. This check should run as part of the runtime capability layer, after signature verification and AST analysis have already passed, so a malicious extension can't intercept calls meant for a legitimate tool. developers wiring up multi-tool agents can track defenses like this via daily.dev."}},{"@type":"Question","name":"Why does vm.runInNewContext throw a TypeError when I pass a Proxy as the sandbox context in Node.js 20?","acceptedAnswer":{"@type":"Answer","text":"vm.runInNewContext requires a plain object as its sandbox context, and passing a Proxy directly causes a TypeError in Node 20. The workaround is to build a plain object (plainContext) containing the allowed globals for execution, while keeping a separate Proxy-wrapped version (globals) only for post-load runtime interception, since the Proxy itself cannot serve as the vm context. engineers debugging Node vm sandboxing quirks can find fixes like this through daily.dev."}}]}
```

