v0.8.0
2026-03-18 LatestAdded
- MCP Server (
servers/pr-spec-analyzer.ts) — 6-tool Model Context Protocol server exposinganalyze_pr,scan_local,check_drift,set_intent,show_intent, andanalyze_assumptionsvia stdio transport - Claude Code plugin metadata (
.claude-plugin/plugin.json,.mcp.json) — enables pr-to-spec as a standalone MCP plugin for Claude Code, Cursor, and Windsurf -
@modelcontextprotocol/sdkdependency for MCP protocol compliance -
--debugflag for CLI — logs API request URLs, git commands, and timing info to stderr -
PR_TO_SPEC_DIRenv var — configurable storage directory (default:.pr-to-spec) - Security test suite (
tests/security.test.ts) — webhook URL validation, custom_command rejection, prototype pollution guard - API error test suite (
tests/github-errors.test.ts) — 401, 403, 404, 422, rate limit, large PR truncation - README: documented all subcommands (
intent,check,contract,graph,feedback) - README: exit code 4 (
gate_failed) - README: troubleshooting section with common errors
Security
- Removed
custom_commandcontract type — eliminated command injection vector from arbitrary shell execution. The type is preserved in the schema but always fails with a clear deprecation message. - Webhook SSRF prevention — validates webhook URLs: requires HTTPS, rejects localhost, private IPs (10.x, 172.16-31.x, 192.168.x), and link-local addresses (169.254.x).
- Reduced GitHub Action permissions —
contents: write→contents: read(the action only reads PRs and posts comments). - Prototype pollution guard —
--fieldextraction blocks__proto__,constructor, andprototypetraversal. - Secret masking — webhook URLs are masked in error output to prevent leaking sensitive endpoints.
Fixed
- Version sync — CLI and Action version strings updated from stale
0.6.0to0.8.0 - API error messages — GitHub API errors now return user-friendly messages instead of raw Octokit exceptions (401, 403, 404, 422, rate limit)
- Git error messages —
scan/checkcommands now surface clear messages for "not a git repo" and "unknown revision" errors - Large PR warning — warns when GitHub API returns 300 files (the per-page maximum), indicating truncation
Changed
- 384 tests passing (all existing tests updated for security changes)