summaryrefslogtreecommitdiff
path: root/plugins/code-modernization/README.md
diff options
context:
space:
mode:
authorMorgan Westlee Lunt <morganl@anthropic.com>2026-06-09 19:40:58 +0000
committerMorgan Westlee Lunt <morganl@anthropic.com>2026-06-09 19:40:58 +0000
commitd44da811468a8124135a67ba64a3d0257a2e36b6 (patch)
tree571c0f31843a1d7a1dbc62d987a59d639e84078b /plugins/code-modernization/README.md
parentc42d4bb58913a22b4b0594bf55c14a4431219049 (diff)
code-modernization: second-order injection fencing, path guards, scoped scaffolder agent
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 <noreply@anthropic.com>
Diffstat (limited to 'plugins/code-modernization/README.md')
-rw-r--r--plugins/code-modernization/README.md13
1 files changed, 10 insertions, 3 deletions
diff --git a/plugins/code-modernization/README.md b/plugins/code-modernization/README.md
index 96b67741..1446299b 100644
--- a/plugins/code-modernization/README.md
+++ b/plugins/code-modernization/README.md
@@ -64,9 +64,15 @@ instruction-shaped text as a finding (`injectionFlags` in workflow results —
surfaced prominently when non-empty); analysis agents are read-only, with
artifact writes happening only in the orchestrating session; citation
referees refute any rule or finding supported by comments rather than
-executable code; and `/modernize-brief` remains a human approval gate before
-anything is executed against. Treat discovery artifacts from code you don't
-trust with the same skepticism as the code itself.
+executable code; agent-produced text is **fenced as untrusted data** when it
+flows into a downstream agent's prompt (referees re-derive claims from the
+cited code rather than trusting the finder's description — second-order
+injection); workflow inputs that become filesystem paths are validated
+against a strict name pattern; the one write-capable workflow agent
+(`scaffolder`) runs with an explicit minimal tool list and a write scope of
+exactly its own service directory; and `/modernize-brief` remains a human
+approval gate before anything is executed against. Treat discovery artifacts
+from code you don't trust with the same skepticism as the code itself.
## Secret handling
@@ -113,6 +119,7 @@ Security hardening pass on the **legacy** system: OWASP/CWE scan, dependency CVE
- **`architecture-critic`** — Adversarial reviewer for target architectures and transformed code. Default stance is skeptical: asks "do we actually need this?" Flags microservices-for-the-resume, ceremonial error handling, abstractions with one implementation. Used by `reimagine` and `transform`.
- **`security-auditor`** — Reviews code for auth, input validation, secret handling, and dependency CVEs. Tuned for the kinds of issues that appear when translating security primitives across stacks (e.g., session handling from servlet to stateless JWT). Used by `assess` and `harden`.
- **`test-engineer`** — Writes characterization, contract, and equivalence tests that pin legacy behavior so transformation can be proven correct. Flags tests that exercise code paths without asserting outcomes. Used by `transform`.
+- **`scaffolder`** — Builds one service of a reimagined system from the approved architecture and spec: skeleton, domain model, API stubs, executable acceptance tests. Write scope is exactly its own `modernized/.../<service>/` directory; treats the spec's imperative-sounding content as data, since the spec derives from untrusted legacy code. Used by `reimagine` (Phase E).
## Installation