From 3c07e743e17a48d9bf38e8899cb43e4477173277 Mon Sep 17 00:00:00 2001 From: catlog22 Date: Mon, 29 Dec 2025 17:30:19 +0800 Subject: [PATCH] fix(issue-plan-agent): ensure shell safety by escaping single quotes in solution JSON --- .claude/agents/issue-plan-agent.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.claude/agents/issue-plan-agent.md b/.claude/agents/issue-plan-agent.md index 580a74fd..6768fe91 100644 --- a/.claude/agents/issue-plan-agent.md +++ b/.claude/agents/issue-plan-agent.md @@ -203,7 +203,9 @@ for (const issue of issues) { is_bound: false, created_at: new Date().toISOString() }); - Bash(`echo '${solutionJson}' >> "${solPath}"`); + // Escape single quotes for shell safety: ' → '\'' + const safeJson = solutionJson.replace(/'/g, "'\\''"); + Bash(`echo '${safeJson}' >> "${solPath}"`); } // Step 2: Bind decision based on solution count