EmDash Plugins: Sandboxed vs Native, Security Boundary
Sandboxed EmDash plugins run isolated behind a declared capability manifest; native plugins are npm packages with full host access. Capabilities, Astro rendering and the real security boundary, measured.

EmDash CMS ships two plugin formats, and they carry different powers and different trust models. Sandboxed plugins install from the admin, declare their capabilities in a manifest, and run isolated from your site. Native plugins are npm packages wired into astro.config.mjs, running with the same access as your site itself. Cloudflare sells the sandbox as the answer to two decades of WordPress supply-chain damage, and the isolation is real. But the features editors and visitors touch daily, rendering, admin dashboards, editor buttons, are native-only as of EmDash 1.4.0 (released 29 October 2026). The comparison below measures both formats with real manifests, permission counts, and runtime limits: what each can do, where the security boundary sits, and when native is the honest call.
The short answer: sandboxed or native
Most people assume the split is about security. The line that pushes plugins between formats is rendering. Here is the whole picture:
Sandboxed vs native at a glance
- Install route
- One click from the EmDash admin. npm package in astro.config.mjs
- Permission gate
- Consent dialog on install, runtime enforces every call. Capability list exists, nothing enforces it
- Rendering
- Block data and metadata only, no .astro components. .astro components, client islands, any frontend
- Admin UI
- Block Kit panels (declarative JSON). Full React, any npm UI library
- Runtime limits
- 30 s wall time, 10-subrequest budget on Cloudflare. Host process limits only
- Trust model
- Declared, approved, enforced. Trust the author
Default to sandboxed whenever the declared capability set covers the job, and prefer it on any site where more than one person installs plugins. Go native when the plugin must render components on public pages or own a real admin UI, and say which format you chose in the README, because your users inherit the trust decision. Site owners can stop at the trust row; plugin developers should read the rendering row twice, since it decides the architecture of whatever they build. For the vendor's own wording of the split, read the official choosing-a-format guide; the sections below add the numbers the guide leaves out.
How the sandbox works: manifest, consent, enforcement
Three moving parts hold the boundary together: a manifest the publisher ships, a consent step the admin approves, and a runtime that refuses undeclared calls.

The emdash-plugin.jsonc manifest
Plugins installed from the EmDash plugin catalogue are always sandboxed, and each one declares what it may touch in an emdash-plugin.jsonc file at the package root. The file is long, but three fields carry the trust contract:
{
"slug": "gallery",
"publisher": "did:plc:abc123def456",
// trust contract 1: which ctx APIs the plugin may call
"capabilities": ["content:read", "network:request"],
// trust contract 2: which hosts ctx.http.fetch may reach (wildcards explicit)
"allowedHosts": ["api.example.com", "*.cdn.example.com"],
// trust contract 3: plugin-scoped storage, outside draft and revision rollback
"storage": { "galleries": { "indexes": ["contentId"] } },
"admin": { "pages": [{ "path": "/gallery", "label": "Gallery", "icon": "image" }] },
"release": { "requires": { "env:emdash": ">=0.37.0", "env:astro": ">=5.0.0 <7.0.0" } }
}capabilities gates the ctx APIs, allowedHosts gates ctx.http.fetch, and storage is the plugin's own indexed data. Everything else in the file is packaging metadata: name, author, license, admin page definitions, and the release.requires version floors.
The consent dialog and capability diffs
Install one and the admin gets a consent modal listing every capability and domain in the manifest. Decline a capability and the API behind it disappears: a plugin without content:read finds ctx.content undefined at call time. An update that widens the manifest suspends until an admin approves the new capability set. Before any of that runs, the registry, which sits on the AT Protocol, verifies the publisher's DID signature and the bundle checksum against the signed record, then shows the dialog. The docs describe that verification chain in full.
What the runtime enforces
On Cloudflare the isolate is a Dynamic Worker Loader (env.LOADER); self-hosted installs run the same code in standalone workerd. Both hand the plugin a gated PluginContext instead of the platform. fetch, process.env, and Node built-ins like fs, path, and child_process are stripped from the isolate, and emdash-plugin bundle fails the build when the code imports them. Outbound calls have exactly one door, ctx.http.fetch, and the bridge behind it checks allowedHosts before a packet leaves: calls to other domains throw inside the sandbox. Even network:request:unrestricted, which exists for user-configured webhooks, is SSRF-guarded. Loopback, link-local metadata addresses such as 169.254.169.254, and RFC 1918 ranges are blocked, redirects lose their Authorization headers when they cross origins, and request and response bodies are capped at 8 MiB. That loader also sits behind the Workers Paid plan on Cloudflare; which hosts can run the sandbox at all is covered in EmDash hosting options compared.
What sandboxed plugins can do
The manifest vocabulary is wider than most people expect: content, schema, taxonomies, bylines, redirects, media, comments, users, email, network, storage, hooks, and metadata injection all have typed ctx APIs behind them. Real plugins combine them; these are the capabilities that matter in practice, each with a live registry example as of 8 Nov 2026:
What sandboxed plugins can do (capability to API to live example)
- content:read, content:write, content:publish
- ctx.content.get(), create(), update(), publish(), schedule(). emdash-stripe, approvals, sync tools
- content:revisions:read, content:restore
- ctx.content.listRevisions(), getRevision(), restore(). approvals, recovery utilities
- schema:read
- ctx.schema.listCollections(), getCollection(). emdash-stripe, site-health
- taxonomies:read / taxonomies:write
- ctx.taxonomies.getAll(), getTerms(), createTerm(). tag and category managers
- bylines:read
- ctx.bylines.get(), list(). author credit tools
- redirects:read / redirects:write
- ctx.redirects.list(), create(), update(), delete(). site-health
- media:read, media:bytes:read, media:write
- ctx.media.get(), readBytes(), upload(). exif
- comments:read, comments:moderate
- ctx.comments.list(), setStatus(). moderation bots
- users:read
- ctx.users.get(), getByEmail(), list(). approvals
- email:send
- ctx.email.send(). freeform, emdash-stripe, site-health
- network:request
- ctx.http.fetch() limited to allowedHosts. emdash-stripe (locked to api.stripe.com)
- network:request:unrestricted
- ctx.http.fetch() to any public host, SSRF-guarded. freeform, site-health
- hooks.content-policy:register
- content:beforePublish and sibling hooks. approvals
- page:metadata
- meta tags, JSON-LD, allowlisted <link rel> values. SEO and OpenGraph plugins
- storage and KV
- indexed plugin-scoped document storage. most functional plugins
- admin.pages, admin.widgets
- Block Kit (declarative JSON). settings panels, dashboards
Permission counts on live listings run from zero to seven, and that spread is what EmDash plugins look like inside the sandbox. LLL Article Contents v0.1.1 requests nothing at all (0). Freeform v1.3.0 requests network:request:unrestricted and email:send (2). emdash-stripe v0.1.0 requests content:read, schema:read, network:request locked to api.stripe.com, and email:send (4). Site Health & Broken Links v0.2.0 requests 6. Content Approval v0.3.0 requests 7, including hooks.content-policy:register, which is what lets it block publishing until sign-off. Forms are the canonical sandboxed case, and EmDash contact forms runs the pattern end to end: email:send, plugin storage, Block Kit admin.
What sandboxed plugins cannot do
The boundary is a hard list. Sandboxed plugins cannot:
What the sandbox does not allow
- Ship .astro rendering components: blocks can be defined and stored, never rendered on public pages
- Provide a full React admin: Block Kit declarative JSON only (the admin UI exists, arbitrary React does not)
- Inject scripts, stylesheets, or raw HTML: page:fragments is native-only, and page:metadata allows meta, JSON-LD, and a few rel values while stylesheet and prefetch stay blocked
- Extend the editor toolbar: no TipTap marks or inline buttons, so authors type [fn] or paste /go/slug by hand
- Serve top-level routes: plugin APIs live under /_emdash/api/plugins/<slug>/ only
- Gate panels by role: Block Kit panels cannot hide from Authors and show to Editors
- Roll back with your content: plugin storage sits outside the draft and revision system
That list is not theoretical. Gaurav Tiwari ported 8 WordPress plugins and built 1 new one, 9 total under @gatilab, and validated them on core-forms.com across 186 articles; every one of the 9 had to ship native. His read of why: "The catch is that the features editors and visitors notice are native-only. A sandboxed plugin can't ship Astro rendering components for its own content blocks, can't use a full React admin and can't inject scripts or HTML into public pages."
Native plugins: the other format
How a native plugin installs
Native plugins are plain npm packages authored with definePlugin(). The install is the standard Node dance: pnpm add @gatilab/emdash-footnotes, then register the plugin in astro.config.mjs:
import { defineConfig } from "astro/config";
import emdash from "emdash/astro";
import { footnotes } from "@gatilab/emdash-footnotes";
export default defineConfig({
integrations: [
emdash({
plugins: [
footnotes({
prefix: "ref-",
backlinkLabel: "Jump back"
})
]
})
]
});There is no third format. Registry installs are always sandboxed, and anything registered in plugins: [] runs in-process with no isolation, whether it was authored native or moved there because no sandbox runner was available.
What native unlocks
A native plugin gets everything the sandbox withholds: a componentsEntry that maps block types to .astro components, a full React admin with any npm UI library, page:fragments hooks for scripts and stylesheets on public pages, typed constructor options in astro.config.mjs, and direct fetch, env, and fs. The live reference is the DashCommerce vs Stripe vs Moksa comparison: @dashcommerce/core runs native with multi-item carts, direct Stripe webhooks, and <AddToCart /> islands, while its dashcommerce-lite sibling sits sandboxed on the registry with 2 permissions and cannot ship those islands at all. Upgrades are yours to run as well. Tiwari's account of moving core-forms.com from 1.1.0 to 1.4.0: "Updating EmDash isn't a button in that admin. When I moved core-forms.com from 1.1.0 to 1.4.0, the upgrade meant bumping the npm package, checking the database migrations, building and redeploying the Worker." The steps for a version bump are in the EmDash 1.4 upgrade guide.
The trust trade-off
What native gives up is the boundary, and the docs do not soften it:
Native plugins have the same access as the host site. End users can't audit them through capability declarations alone.
Tiwari, who runs these in production, puts the same trade-off in operator terms:
So on a site running plugins like mine, the trust model is the one WordPress users already know: you trust the people whose code you install.
Both statements describe the WordPress model. Patchstack's State of WordPress Security 2026 report counted 11,334 new vulnerabilities in the WordPress ecosystem in 2025, 91% of them in plugins, and that is the history the EmDash vs WordPress comparison weighs platform trust against.
Astro rendering: the gap that pushes plugins native
What pushes serious plugins native is rendering, not the security model. A sandboxed plugin can store block data and ship admin panels, but the .astro component that renders a block on a public page has to exist at build time, from npm. Every plugin that shows something to visitors solves that problem, and as of 8 Nov 2026 there are three patterns.
The vendor-grade pattern keeps the sensitive half sandboxed and publishes rendering separately. Solspace ships Freeform (@solspace.com/freeform v1.3.0, 2 permissions) on the registry for the form builder, submissions inbox, spam scoring, and webhooks, and ships @solspace/freeform-astro on npm for the frontend. Templates embed <FreeformForm formId="contact" /> and get unstyled semantic HTML that the site's CSS owns, while keys, storage, and mail stay in the sandbox.
EmDash has no global content filter, so shortcodes need their own renderer. As Tiwari put it, "Dynamic Dates and Footnotes render shortcodes only where the theme uses each plugin's own <PortableText> wrapper. A plain <PortableText> prints [fn] as text." The theme has to import the plugin's wrapper component or the markers land in the page exactly as typed.
Without a companion package, the frontend ships as source you copy yourself. dashcommerce-lite takes that route: its storefront templates live in packages/lite/storefront and move into your src/components/ by hand, which is why the DashCommerce vs Stripe vs Moksa comparison walks the Lite install step by step.

Pattern 1 is what vendors ship. Patterns 2 and 3 are what everyone else does today, and both leave the rendering code in your theme rather than in the plugin.
What the sandbox costs at runtime
The limits matrix
The isolation is not free, and the bill shows up as limits. Three runtimes, three different sets of them, as of 8 Nov 2026:
Runtime limits: Workers Paid vs self-hosted workerd vs native
- Wall time per call
- 30 s. 30 s. Host process timeout
- CPU time
- Small default budget: 50 ms per EmDash's docs, expandable toward the 30 s wall clock. Unenforced (warns on config). Unenforced (shares the host event loop)
- Subrequests per invocation
- 10. Unenforced. 1,000 (host limit)
- Memory
- memoryMb unenforced (128 MB platform isolate ceiling). Host container limit. Host Node memory
- Host access
- Stripped (process.env, fs gone). Stripped. Full
Two asymmetries decide real deployments. On Cloudflare, sandboxed plugins need the $5 Workers Paid plan: Dynamic Worker Loaders are not on Workers Free, and without the plan installs fail SANDBOX_NOT_AVAILABLE while browsing the registry still works. Self-hosted workerd runs sandboxed plugins with no plan attached, but enforces only the 30-second wall time, with no CPU ceiling and no subrequest budget. The workerd self-host path, and what each host allows, is covered in EmDash hosting options compared. The 50 ms CPU figure is the custom per-invocation cap EmDash's Cloudflare runner sets on env.LOADER (limits.cpuMs); Cloudflare's own Workers Paid platform default is 30 seconds (configurable up to 5 minutes) for standard Workers.
The 10-subrequest budget and PR #4723
The sharpest limit on Cloudflare is the 10-subrequest budget per invocation, because every call across the capability bridge spends one. Public URL resolution is the classic trap: ctx.content.getPublicUrl() costs a bridge call per entry, so a plugin listing 20 entries needs 21 calls and fails after 9. Daniel Mueller hit it with analytics and events plugins:
A sandboxed plugin pays one bridge call per entry for public URLs, which exhausts the 10-subrequest budget after a few entries... My analytics plugin has three left for URLs per run, and an events plugin needs 21 calls to list 20 events with their links.
PR #4723, opened 7 November 2026 and under review as of 8 Nov 2026, proposes ctx.content.list({ publicUrl: true }): the host resolves and attaches URLs before the list crosses the bridge, folding those per-entry calls into one. It is proposed, not shipped. Until it merges, batch-aware plugin code or self-hosting, where the budget is unenforced, are the only workarounds.
Sandboxed vs native: the decision
When each format is the right call
- Sandboxed is enough: content tools, forms, SEO, moderation, anything that fits a declared capability set
- Native is the honest choice: .astro components, full React admin, page fragments, editor marks, top-level routes
- Before installing a native plugin: read the code, pin the version, review the lockfile diff on every update
Stated plainly: installing a native plugin is a WordPress-grade trust decision. The author's code runs in your host process and no capability list will audit it for you. The sandbox is the better default, and it is not a safety certificate either: content:write reaches every collection on the site, including content the plugin never created, plugin storage rolls back with nothing, and timing and storage-size side channels remain visible.
WordPress vs EmDash sandboxed vs EmDash native
- Execution context
- Same PHP process as core. Isolated V8 isolate (workerd or Worker Loader). Same Node/Astro process as core
- File system
- Full read/write to the server. None (fs stripped). Full Node access
- Database
- Unrestricted raw SQL. Gated by capability, parameterized bridge. Full access
- Network
- Arbitrary wp_remote_get(). allowedHosts via ctx.http. Arbitrary fetch()
- Admin consent
- None (activation is full trust). Granular modal with capabilities and domains. None (npm config)
- Update verification
- Automatic or one-click, no diff. DID signature plus capability diff. npm semver
If you are choosing today: sandboxed when the capability set fits, native when rendering demands it, and read the manifest before you approve it.
Common questions
Are EmDash plugins safe?
Two different questions hide in that one. Sandboxed plugins are bounded by the capabilities they declared and you approved, and the runtime enforces that list on every API call; inside a granted capability, authority is coarse, so content:write still reaches every collection. Native plugins carry the WordPress trust model: the author's code runs with your site's full access, so safety becomes a code-review question.
What is the difference between sandboxed and native EmDash plugins?
Install route, isolation, enforcement, and rendering reach. Sandboxed plugins install from the admin, run in a V8 isolate, and touch host APIs only through capabilities the runtime checks on every call. Native plugins are npm packages in astro.config.mjs that run in your host process with nothing enforcing their capability list, and they can ship .astro components and a full React admin.
Do EmDash plugins need the Cloudflare Workers Paid plan?
Sandboxed plugins on Cloudflare do: Dynamic Worker Loaders (env.LOADER) are part of the $5 Workers Paid plan, and without it installs fail while registry browsing still works. Self-hosted workerd runs sandboxed plugins with no plan at all, but it enforces only the 30-second wall time, with no CPU or subrequest limits. Native plugins need nothing either way.
Can a sandboxed EmDash plugin render custom blocks on my site?
Not by itself. The sandbox cannot ship .astro components, so rendering arrives through one of three routes: a companion npm package (the Solspace Freeform pattern), a dedicated <PortableText> wrapper for shortcodes, or manual copy of frontend components into src/components/ (the DashCommerce Lite path). Each keeps the block data in the sandbox and the rendering in your theme.
Do native EmDash plugins have permissions?
They can declare capabilities, and nothing enforces them. The EmDash docs call the native capability list "not a security boundary": a native plugin can call fetch() directly, read environment variables, or block the event loop. Audit the code and pin the version instead of trusting a manifest.