WP Manifestindependent plugin directory
manifest / ai / gutenwright

Gutenwright WP Registry grade D+. High-severity findings · 2 findingsWP RegistryHigh-severity findings · 2 findingsOpen the reportD+

Prompt-powered Gutenberg composition for WordPress.

★ 26stars
10release downloads
v0.0.7latest · 5mo ago

Install

Download pressmind.zip From the v0.0.7 release on GitHub, May 19, 2026

Upload it under Plugins → Add New Plugin → Upload Plugin, then activate.

Install straight from GitHub with WP-CLI:

wp plugin install https://github.com/f/gutenwright/releases/download/v0.0.7/pressmind.zip
No built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.

Gutenwright

Prompt-powered Gutenberg composition for WordPress.

Try Gutenwright stable in WordPress Playground Try Gutenwright nightly in WordPress Playground

Quick start · Security model

WordPress License Status

What Is Gutenwright?

Gutenwright is an experimental WordPress plugin that turns natural language prompts into real Gutenberg blocks. It reads the current post context, streams model output in the editor, and replaces the prompt block with generated content.

Naming Notice

This project was formerly named ‘pressmind’. It has been renamed to avoid a naming conflict with the registered trademark of Pressmind GmbH. This project has never been affiliated with, endorsed by, sponsored by, or connected to Pressmind GmbH or its products.

It can create static layouts, rich HTML, SVG diagrams, org charts, tables, callouts, sandboxed interactive widgets, and Media Library-backed AI images.

The bigger goal is to make New York Times-style interactive posts approachable inside ordinary WordPress. Visual explainers, animated SVG diagrams, scrollytelling sections, and small playable widgets that newsrooms usually hand-build per article can be composed uniquely per post in the Gutenberg editor with AI support, instead of from a fixed template.


Watch the demo video

Highlights

  • Context-aware generation: Sends bounded post context so generated blocks match the current article.
  • Streaming editor feedback: Shows model output while the backend is generating.
  • Real Gutenberg output: Returns serialized block markup and inserts parsed blocks into the editor.
  • Smart rendering mode: Keeps simple HTML/SVG as core/html; moves scripts/styles into an isolated sandbox block.
  • Editable generated blocks: Refine selected HTML or sandbox blocks with AI using the existing code as context.
  • Sandboxed interactivity: Games, calculators, and scripted UI render in an iframe with no same-origin access.
  • Optional image generation: Generates images with OpenAI Images, imports them into the Media Library, and inserts core/image blocks.

Demo

Local Playground

npm install
npm run playground

This builds the block assets and starts a local WordPress Playground instance with auto-login on the latest stable WordPress build.

To test against WordPress nightly for upcoming WordPress 7.0 APIs such as Connectors:

npm run playground:nightly

Hosted Playground Blueprint

This repository includes two WordPress Playground blueprints:

Open Gutenwright in a fresh browser-based WordPress site:

Launch stable Playground Launch nightly Playground

Both blueprints enable networking, log into wp-admin, install Gutenwright from GitHub, activate the plugin, and open a new post. That post is imported from examples/gutenwright-demo-post.html and includes prefilled Gutenwright prompt placeholders. They are not sent to AI until you click Generate Blocks.

For a fully generated longform example, see examples/mental-health-interactive-news.html. It mimics Gutenwright output for an interactive mental-health news feature with custom HTML, inline SVG, sandboxed charts, a playable breathing exercise, and resource guidance.

Quick Start

npm install
npm run build

Then install the plugin in WordPress and activate Gutenwright.

Go to Settings > Gutenwright and configure:

  • Credentials source: WordPress Connector or Gutenwright custom settings
  • Connector selection or custom API key/endpoint fields
  • Text model
  • Optional image generation model and size

On WordPress 7.0+, Gutenwright can use API keys from the new WordPress Connectors API. If multiple API-key AI connectors are registered, choose one in Settings > Gutenwright. Connector mode hides the custom API key and endpoint controls, but still lets you choose the model name. Choose Custom settings to show and use Gutenwright’s own API key and endpoint fields instead.

Example Prompts

Create a comparison table from this post.
Generate an accessible SVG org chart for the teams described here.
Build a sandboxed tic-tac-toe game with modern styling.
Generate a hero image for this post and insert it with a caption.

How It Works

flowchart LR
    PromptBlock[Gutenwright Block] --> RestAPI[WordPress REST API]
    RestAPI --> Model[AI Model]
    Model --> RestAPI
    RestAPI --> Parser[Block Parser]
    Parser --> Editor[Gutenberg Editor]
    RestAPI --> Media[Media Library]

The backend asks the model for strict JSON with:

  • summary: A short editor-facing description.
  • serializedBlocks: Valid serialized Gutenberg block markup.
  • assets: Optional generated media requests.
  • warnings: Safe fallbacks or limitations.

Security Model

  • API keys are stored in WordPress options and used only server-side.
  • REST endpoints require the current user to be able to edit the target post.
  • Returned block markup is parsed, allowlisted, and sanitized before insertion.
  • Static HTML and SVG use a conservative allowlist.
  • Scripted or style-tagged content is isolated in gutenwright/sandbox.
  • Sandbox iframes use sandbox="allow-scripts" without same-origin access.
  • Generated images are imported into the WordPress Media Library before insertion.

Development

npm run start
npm run lint:js
npm run format
npm run build

Main files:

Status

Gutenwright is experimental and intended for exploration, demos, and early feedback. Review generated code and content before publishing.

Example Output

Gutenwright example output

Open the mental-health example in WordPress Playground
A New York Times-style interactive feature, uniquely composed inside the Gutenberg editor with AI support. Loads examples/mental-health-interactive-news.html as a Gutenberg post in a fresh Playground site.

License

GPL-2.0-or-later

Releases

7 releases. Each count is every asset in that release; expand a row for the breakdown.

Tag
Published
Assets
Downloads
v0.0.7 latest
May 19, 2026 5mo ago
pressmind.zip
5
May 19, 2026 5mo ago
pressmind.zip
0
May 14, 2026 5mo ago
pressmind.zip
0
May 14, 2026 5mo ago
pressmind.zip
2
May 13, 2026 5mo ago
pressmind.zip
0
May 12, 2026 5mo ago
pressmind.zip
1
May 12, 2026 5mo ago
pressmind.zip
2
D+ grade

Security

Gutenwright 0.0.7 · audited by WP Registry

High-severity findings.

1 high 1 medium
Audited release
0.0.7
Findings
2
Worst severity
high
Content hash
9acb99a18dea9a4d4711220a…

Findings

  • high Contributor+ stored XSS in site origin when seamless mode is enabled

    xss_stored

    pressmind/sandbox stores unsanitized html/css/js in block-comment JSON. WordPress wp_kses_post() does not scrub Gutenberg comment attributes, and the block is registered in the inserter with TextareaControls for HTML/CSS/JavaScript — no current_user_can('unfiltered_html') on save or render. When an administrator opts into Settings > Pressmind > Seamless Mode (site-wide pressmind_options.seamless_mode), pressmind_render_sandbox_block() switches from an isolated iframe to pressmind_render_seamless_block(), which interpolates $html, $css, and $js raw into the published page (only title is escaped; a str_ireplace of </script does not stop attacker JS). The same flag makes the block editor preview do n.innerHTML = e.html and window.Function(e.js)() in wp-admin. Observable: on a default single-site install (DISALLOW_UNFILTERED_HTML unset), a Contributor inserts the block, sets js to exfiltrate wpApiSettings.nonce / document.cookie, and submits the post; an Administrator who opens it in Gutenberg (or any visitor of a post an Author published) runs that script in the WordPress origin. Subscriber/customer cannot reach the editor. Multisite is mitigated because the plugin disables sandbox/seamless when DISALLOW_UNFILTERED_HTML is true. The admin consent checkbox does not restrict which roles may then persist executable attributes.

    pressmind.php:148-187

    Recommendation

    Do not treat seamless_mode as a site-wide unfiltered-HTML grant. Persist html/css/js only if the saving user has unfiltered_html (or manage_options); otherwise strip those attributes on rest_insert / content_save_pre / render_block_data. Keep seamless rendering behind both the option and that capability. In the editor, never innerHTML/Function() untrusted attributes — preview inside a sandboxed iframe even when seamless publishing is on. Hide the sandbox block from the inserter for roles that lack unfiltered_html.

  • medium Sandbox block lets Contributor+ persist executable JS, bypassing unfiltered_html

    xss_stored

    Even with seamless mode off (the default), pressmind/sandbox is a first-class inserter block whose html/css/js attributes are stored in post_content and rendered by pressmind_render_sandbox_block() into an iframe srcdoc with sandbox="allow-scripts" (no allow-same-origin). sanitize_sandbox_attrs() / strip_sandbox_network_access() run only on the AI generate REST path, not on manual textarea edits or on render; they also only regex-strip obvious fetch/parent/cookie primitives and are bypassable. Authors can publish immediately; Contributors can plant the block in a draft for an editor to publish. Scripts execute in an opaque unique origin so they cannot read WordPress cookies or the parent DOM, but this still bypasses the core unfiltered_html policy that otherwise stops those roles from shipping JavaScript. DISALLOW_UNFILTERED_HTML (typical multisite) short-circuits render to a warning. Subscriber cannot insert the block. REST POST pressmind/v1/generate is the same audience (edit_posts) and will return sandbox blocks with preserved JS.

    pressmind.php:37-70,132-165

    Recommendation

    Require unfiltered_html (or a dedicated capability) to save non-empty html/css/js on pressmind/sandbox. Add attribute sanitize_callbacks that kses html and empty js for everyone else. Keep sandbox="allow-scripts" without allow-same-origin, allow-forms, and allow-top-navigation. Apply strip_sandbox_network_access on render as well as on generate, but do not treat that regex as an authorization check.

WP Registry hashes the installable build and reports on that exact bytes-for-bytes copy. Embargoed findings are withheld until they are disclosed, so a clean verdict means nothing public is outstanding. WP Manifest does not audit code itself.