fix(runtime-services): keep database passwords ephemeral#2053
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Connector target contract
Managed providers return
env,secretEnv, andsecretEnvTargets. A mapping such as{ DB_PASSWORD: MYSQL_PASSWORD }allows a configurable secret output name to feed the canonical PHP connector input without copying the value into non-secret environment or generated files.Before provisioning, WP Codebox validates declared connector targets against:
inputs.runtimeEnvinputs.secretEnvdistribution.envCollisions and ambiguous mappings fail before any provider command runs. Aggregate-time validation repeats the checks against actual provider results; if an unexpected target appears after allocation, all provisioned resources are released. Runtime creation also rejects direct runtime/distribution shadows before writing bootstrap files, and execution rejects per-command environments and
runtime-env-jsonoverrides that target connector names.Execution-path security
The tracked Playground CLI patch forwards in-memory
phpEnvinto EmscriptenENVfor v1/v2 primary and spawned workers. This covers installation/startup blueprints, direct PHP, HTTP/browser/preview traffic, probes, CLI, request workers, and concurrent process identities.Generated command and ability PHP exclude every mapped secret source.
wp-config.php, auto-prepend PHP, request-worker payloads, recipes, snapshots, evidence, and persisted artifacts contain no connector secret values.Coverage
outputs.password: MYSQL_PASSWORDsafely targets canonicalDB_PASSWORDDB_PASSWORDfail before provisioningTests
npm run build:releasenpm run test:runtime-servicesnpm run test:runtime-services-lifecyclenpx tsx tests/playground-cli-runner-bootstrap-ini.test.tsnpm run test:redactionnpm run test:recipe-secret-envnpm run test:schema-paritynpm run test:recipe-validation-descriptorsnpm run test:agent-task-contractsnpm run test:bounded-runtime-plannpm run test:bounded-recipe-plannpm run test:bounded-recipe-plan-integrationnpm run test:release-package-coveragegit diff --checkThe Docker-backed MySQL/MariaDB integration is part of PR CI; the local host has no Docker and reports its explicit Docker-unavailable skip.
Follow-up to #2046.