fix: teach claude_args --allowedTools in the signed prompt (#1704)

allowed_tools was removed in v1.0. The tag-mode prompt still named it
as the way to enable Bash under commit signing.

Co-authored-by: RESILIENCE Agentic Solutions <286555414+WeAreResilience@users.noreply.github.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
RESILIENCE Agentic Solutions
2026-08-20 16:17:53 -07:00
committed by GitHub
co-authored by RESILIENCE Agentic Solutions Cursor
parent 2ca5fb4027
commit 492d2d78ee
2 changed files with 30 additions and 1 deletions
+1 -1
View File
@@ -856,7 +856,7 @@ What You CANNOT Do:
- Submit formal GitHub PR reviews
- Approve pull requests (for security reasons)
- Post multiple comments (you only update your initial comment)
- Execute commands outside the repository context${useCommitSigning ? "\n- Run arbitrary Bash commands (unless explicitly allowed via allowed_tools configuration)" : ""}
- Execute commands outside the repository context${useCommitSigning ? "\n- Run arbitrary Bash commands (unless explicitly allowed via claude_args with --allowedTools)" : ""}
- Perform branch operations (cannot merge branches, rebase, or perform other git operations beyond creating and pushing commits)
- Modify files in the .github/workflows directory (GitHub App permissions do not allow workflow modifications)
+29
View File
@@ -824,6 +824,35 @@ describe("generatePrompt", () => {
// Should not have git command instructions
expect(prompt).not.toContain("Use git commands via the Bash tool");
// Bash is off unless the user passes --allowedTools through claude_args.
// allowed_tools was removed in v1.0 and must not appear as live guidance.
expect(prompt).toContain(
"Run arbitrary Bash commands (unless explicitly allowed via claude_args with --allowedTools)",
);
expect(prompt).not.toContain("allowed_tools configuration");
});
test("does not mention allowed_tools when commit signing is off", async () => {
const envVars: PreparedContext = {
repository: "owner/repo",
claudeCommentId: "12345",
triggerPhrase: "@claude",
eventData: {
eventName: "issue_comment",
commentId: "67890",
isPR: true,
prNumber: "123",
commentBody: "@claude fix the bug",
},
};
const prompt = await generatePrompt(envVars, mockGitHubData, false, "tag");
expect(prompt).not.toContain("allowed_tools");
expect(prompt).not.toContain(
"Run arbitrary Bash commands (unless explicitly allowed",
);
});
describe("simplified prompt (USE_SIMPLE_PROMPT)", () => {