From d44da811468a8124135a67ba64a3d0257a2e36b6 Mon Sep 17 00:00:00 2001 From: Morgan Westlee Lunt Date: Tue, 9 Jun 2026 19:40:58 +0000 Subject: code-modernization: second-order injection fencing, path guards, scoped scaffolder agent MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Addresses automated security review of the workflow conversion: - Agent-produced text (rule specs, finding descriptions, dedup lists) is fenced as untrusted data when interpolated into downstream agent prompts, with embedded fence markers stripped so the fence can't be escaped; referees and judges are told to re-derive claims from the cited code. - system/service/subdir names that land in filesystem paths inside prompts are validated against a strict pattern — traversal-shaped values throw before any agent spawns. - Reimagine scaffolding now uses a dedicated 'scaffolder' agent with an explicit minimal tool list, a single-directory write scope, and the untrusted-content discipline extended to the generated spec/architecture docs it builds from (they derive from untrusted legacy code). Co-Authored-By: Claude Fable 5 --- plugins/code-modernization/commands/modernize-reimagine.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins/code-modernization/commands') diff --git a/plugins/code-modernization/commands/modernize-reimagine.md b/plugins/code-modernization/commands/modernize-reimagine.md index dc5085bc..f269aa11 100644 --- a/plugins/code-modernization/commands/modernize-reimagine.md +++ b/plugins/code-modernization/commands/modernize-reimagine.md @@ -91,7 +91,7 @@ result: services scaffolded, total acceptance tests, pending rule IDs, and anything in `blockers` or `notScaffolded`. **Fallback** (no Workflow tool): for each service — cap at 3 to keep the run -tractable; tell the user which you deferred — spawn a **general-purpose agent +tractable; tell the user which you deferred — spawn a **scaffolder agent in parallel**: "Scaffold the service per analysis/$1/REIMAGINED_ARCHITECTURE.md -- cgit