Automattic / Automattic/wp-codebox

Overlay Playground Node DNS resolution for URL-import runtimes

Open
#2,212 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
16
Forks
4
Avg merge
59m
Merged PRs (30d)
131

Description

## Problem

WP Codebox 0.18.4 ships Playground 3.1.46, whose Node PHP.wasm `dns_get_record()` returns an empty array. Public URL importers that validate resolved addresses, including Static Site Importer, fall back to synthetic loopback resolution and correctly reject the target as private. This prevents unchanged end-to-end URL intake in disposable Codebox runtimes.

## Proposed fix

Temporarily overlay the rebuilt Node PHP.wasm packages from WordPress Playground PR #4172 until an upstream Playground release contains the fix. Record the exact upstream commit and add a runtime proof that public A/AAAA records resolve without weakening importer SSRF checks.

Upstream: https://github.com/WordPress/wordpress-playground/pull/4172

## Acceptance criteria

- `dns_get_record()` returns real public records in the Node runtime.
- SSI runs its unchanged fetch, SSRF validation, collection, and import pipeline in WP Codebox.
- The temporary overlay is provenance-documented and removable after the upstream package release.

## AI assistance

OpenAI gpt-5.6-sol via OpenCode was used to reproduce the runtime incompatibility, identify the existing upstream Playground repair, and draft this tracker. Chris Huber remains responsible for the issue and resulting changes.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start at the WP Codebox Node runtime and its Static Site Importer URL-intake entry point, then compare the rebuilt Node PHP.wasm packages from WordPress Playground PR #4172 with the current Playground 3.1.46 packages. Verify that dns_get_record() returns public A/AAAA records and that the unchanged SSI fetch, SSRF validation, collection, and import pipeline still succeeds, with the overlay commit documented for later removal.

Written by the indexing model from the issue text.

Assessment

Tech stack
node.js, php, typescript, wasm
Domain
backend, build-system, security
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.