summaryrefslogtreecommitdiff
path: root/plugins/security-guidance/tests/test_reviewer_tools.py
AgeCommit message (Collapse)Author
2026-10-20Merge branch 'main' into mhegazy/sg-review-sessions-not-savedMohamed Hegazy
The inner CLI retry on main (a start refused over --strict-mcp-config) now also covers a CLI that does not know --no-session-persistence, so one helper handles either refused flag, or both on the same start.
2026-10-19security-guidance: run reviews on machines with a managed MCP configmhegazy/sg-reviewer-managed-mcpMohamed Hegazy
Since 2.0.14 the plugin starts the reviewing Claude Code with --strict-mcp-config. Claude Code exits at startup with that flag on a machine whose administrator delivers the MCP servers (managed-mcp.json), so the agentic commit review always fell back to the single-shot review, and reviews that only run through Claude Code (Bedrock, Vertex) failed. When the inner CLI refuses the flag, the plugin now starts it once more without it, and leaves it out for the rest of the hook process. Those starts deny every MCP tool (--disallowedTools "mcp__*") instead, so the reviewer still gets only its read tools. Review rows from such a process carry strict_mcp_off: 1.
2026-10-19security-guidance: do not save review runs as session transcriptsMohamed Hegazy
The agentic commit reviewer and reviews on 3rd-party providers run an inner Claude Code through the Agent SDK, which saved each run as a session transcript holding the review prompt and diff. Start it with --no-session-persistence; SECURITY_GUIDANCE_PERSIST_SESSIONS=1 keeps the transcripts. An inner CLI that predates the flag is run again without it.
2026-10-15security-guidance: give the commit reviewer only read toolsmhegazy/sg-reviewer-read-only-toolsMohamed Hegazy
allowed_tools only pre-approves tools, so the inner Claude Code that runs a review was still offered the shell, file edits, web access and subagents. Pass the exact tool list instead: Read, Grep and Glob for the commit reviewer, none for the single-turn review.