{"slug": "show-hn-piton-lockfile-and-static-supply-chain-scanner-for-mcp-coding-agent", "title": "Show HN: Piton Lockfile and static supply-chain scanner for MCP/coding agent", "summary": "Piton released v0.4.2, a Python CLI lockfile and static supply-chain scanner for MCP servers, Claude Code hooks and Cursor rules that pins each MCP tool with split SHA-256 hashes and fails pull requests on description drift, structural inputSchema drift, cross-server tool shadowing, Day-1 tool poisoning and coding-agent config remote-code-execution hooks. The tool ships with only 2 runtime dependencies (pydantic and pyyaml), runs a zero-config scan via uvx piton-cli, and adds a piton replay command that replays PII-tokenized traces or OpenTelemetry JSONL spans offline to compute false-block rates and export calibrated policies to CEL or Cedar. Piton separates structural_sha256 (hard-blocked on all servers) from description_sha256 (hard-blocked on third_party servers, warning-only on internal servers) so internal docstring typo fixes do not break CI.", "body_md": "**Lockfile and static supply-chain scanner for MCP servers, Claude Code hooks, and Cursor rules.**\n\nDon't wrap your agents in a probabilistic prompt firewall. Hammer deterministic split-hash pins into every MCP tool, Claude/Cursor hook, and schema.\n\nEvery AI coding agent (`Claude Code`, `Cursor`, `Claude Desktop`, `OpenCode`) now pulls unpinned third-party MCP tool descriptions, executes `.claude/settings.json` shell hooks, and ingests `.cursor/rules` / skill markdown files straight into privileged developer sessions. One silent upstream description edit (an MCP rug pull) or a malicious PR hook turns your repo into instant RCE.\n\n**Piton** gives you a 30-second deterministic lockfile and PR gate—and scales all the way to shadow-to-enforce policy replay (`CEL`/` Cedar` export) and a production Go Envoy v3 `ext_proc` sidecar.\n\nSlim Python CLI — **only 2 runtime dependencies (`pydantic` + `pyyaml`)**:\n\n```\n# Zero-install instant scan (works anywhere with uv):\nuvx piton-cli scan --repo .\n\n# Or install permanently via pipx / pip:\npipx install piton-cli   # or: pip install piton-cli\n\n# 1. Zero-config scan: catches .claude/settings.json hook RCE, .vscode/tasks.json folderOpen autorun,\n#    malicious STDIO MCP commands, and hidden-Unicode / prompt-injection poisoning in .cursor/rules & CLAUDE.md\npiton scan --repo .\n\n# 2. Pin every MCP server with split SHA-256 hashes (probing live HTTP/SSE & STDIO servers)\n#    Quarantines Day-1 poisoned tools before writing piton.yaml + piton.lock\npiton init --repo . --probe\n\n# 3. Wrap any local STDIO MCP server in Cursor / Claude Code to block live rug pulls & over-bounds calls\npiton wrap --enforce --server github -- npx -y @modelcontextprotocol/server-github\n- name: Piton — AI Agent Supply-Chain & MCP Lockfile Gate\n  uses: Tony-Stark2025/piton@v0.4.2\n  with:\n    scan-only: \"true\" # or `probe: \"true\"` / `manifest: observed_tools.json` for MCP lockfile diffs\n```\n\nFails pull requests loudly on:\n\n- **Third-party MCP rug pulls** (`description_sha256` drift on`third_party` servers)\n- **Structural `inputSchema` drift** (`structural_sha256` drift on**all** servers—while`internal` docstring edits only warn so you never break deploys)\n- **Cross-server tool shadowing** (duplicate tool names across distinct MCP servers)\n- **Day-1 MCP tool poisoning** (NFKC homoglyphs, zero-width/bidi Unicode, covert tags, exfil directives)\n- **Coding-agent config RCE** (`.claude/settings.json`` curl|sh` / reverse shell / credential-harvesting hooks, unsafe`Bash(*)` wildcards,`.vscode/tasks.json`` folderOpen` autorun, poisoned`.cursor/rules` & skill files)\n\n1. **Split-Hash Lockfiles (`structural_sha256` vs `description_sha256`)** — Naive single-hash pinning breaks CI every time an internal team fixes a typo in a docstring. Piton separates machine contract hashes (`name` + structural`inputSchema` , always hard-blocked) from prose hashes (`description` + property descriptions: hard-blocked on`third_party` MCPs, warning-only on`internal` MCPs unless poisoning lint triggers).\n2. **Shadow-to-Enforce Policy Calibration (`piton replay`)** — The #1 reason teams disable agent security proxies is false blocks and hand-writing policy. Piton records**PII-preserving tokenized traces** (`alice@acme.com` →`tok_8f1a2b3c@acme.com` , keeping domains and numeric ceilings replayable without storing raw PII) OR ingests existing**OpenTelemetry (OTel) JSONL spans** , replays them offline to compute exact false-block rates, and exports calibrated policies straight to your existing gateway:\n\n```\n# Calibrate bounds offline against shadow traces or OTel spans until false-block rate = 0%\npiton replay --config piton.yaml --traces .piton/traces.jsonl --simulate-enforce\n\n# Export calibrated policies directly to agentgateway (CEL) or ToolHive / AWS AgentCore (Cedar)\npiton replay --config piton.yaml --traces .piton/traces.jsonl --export cel\npiton replay --config piton.yaml --traces .piton/traces.jsonl --export cedar\n```\n\nRuns live Day-1 poisoning quarantine, zero-secret `/gw` egress key swapping + chunk-boundary response secret scrubbing, shadow recording, Go↔Python HMAC ledger verification, and `replay` calibration with zero external API keys:\n\n```\ngit clone https://github.com/Tony-Stark2025/piton.git\ncd piton\npython3 -m venv .venv && source .venv/bin/activate\npip install -e \".[dev]\"\nbash examples/quickstart-billing-agent/run_demo.sh\n```\n\nWhen you move from local coding agents and CI gates into production multi-agent Kubernetes fleets, Piton includes a **hardened static Go sidecar** (`sidecar/`, prebuilt multi-arch binaries + distroless GHCR image) and a **zero-dependency Control Plane**:\n\n```\n  [ Repo / CI ] ──► piton scan + piton init --probe ──► piton.yaml + piton.lock\n                                                                │\n  [ Envoy / agentgateway / Agent ] ◄──► [ Go Sidecar (Envoy v3 ext_proc gRPC + /mcp + /gw) ]\n                                           • RS256/ES256 OIDC JWKS + RFC 8693 OBO (`sub`/` act`)\n                                           • Live tools/list Rug-Pull Pin (`BodyMutation` -32001)\n                                           • Declarative Response Projection (token & exfil reduction)\n                                           • MCP 2026-07-28 MRTR `input_required` + signed approval retry\n                                           • Optional Redis/Valkey shared 1h budgets across K8s replicas\n                                           • Sliding-window multi-encoding secret scrubber\n                                                                │\n                                                                ▼\n                                        [ Piton Control Plane (`piton control-plane`) ]\n                                           • Slack Block Kit & Web UI MRTR Approval Bridge\n                                           • Multi-Pod Signed Ledger Collector (Go↔Python HMAC)\n                                           • Per-Agent Shadow→Enforce Readiness Scorecards\n                                           • Tamper-Evident Signed SOC2 / EU AI Act Audit Export\nhelm install piton-sidecar ./deploy/helm/piton-sidecar \\\n  --set image.repository=ghcr.io/tony-stark2025/piton-sidecar \\\n  --set secrets.existingSecret=piton-sidecar-keys \\\n  --set redis.enabled=true \\\n  --set redis.addr=redis-master.default.svc.cluster.local:6379 \\\n  --set controlPlane.collectorUrl=http://piton-control-plane:8090 \\\n  --set envoyGateway.enabled=true \\\n  --set envoyGateway.targetRef.name=mcp-agents-route\n```\n\nEvery commit is verified in CI against a live `envoyproxy/envoy:v1.33-latest` container wired to our distroless Go sidecar over HTTP/2 gRPC `ext_proc`:\n\n```\ncd deploy/envoy-e2e\ndocker compose up -d --build\npython3 verify_envoy_e2e.py\ndocker compose down -v\n# Terminal 1: Start central Governance UI, Fleet Ledger Collector & MRTR Slack/Web Approval Bridge\nPITON_LEDGER_SIGNING_KEY=\"dev-secret-key-32-bytes-minimum\" \\\n  piton control-plane --host 127.0.0.1 --port 8090\n\n# Terminal 2: Run agent with zero real secrets in env, streaming telemetry & escalations to Control Plane\nPITON_LEDGER_SIGNING_KEY=\"dev-secret-key-32-bytes-minimum\" \\\n  piton run --collector-url http://127.0.0.1:8090 -- python my_agent.py\npiton scan --repo .                                         # Scan Claude/Cursor hooks, tasks, rules & skills\npiton init --repo . [--probe] [--manifest tools.json]       # Generate piton.yaml (shadow), piton.lock & .env.agent\npiton lock --diff [--probe | --manifest tools.json]         # PR gate: split-hash drift + shadowing + hook RCE\npiton lock --update [--probe | --manifest tools.json]       # Refresh approved lockfile hashes after review\npiton wrap --server <name> -- <stdio-mcp-cmd>               # Runtime STDIO pin & bounds for Cursor / Claude Code\npiton replay --simulate-enforce [--export cel|cedar]        # Calibrate bounds from ledger or OTel spans\npiton run [--collector-url URL] -- <agent-cmd>              # Zero-secret local agent runner (auto-fetches sidecar)\npiton top --traces .piton/traces.jsonl [--follow]      # Live PII-tokenized flight recorder\npiton ledger-verify --traces .piton/traces.jsonl       # Verify Go↔Python HMAC chain integrity\npiton control-plane --host 127.0.0.1 --port 8090            # Fleet ledger collector, MRTR bridge & SOC2 export UI\n# Go sidecar race tests (Envoy v3 gRPC ext_proc, OIDC RS256/ES256, Redis store, Response Projection)\n(cd sidecar && go test -race -v ./...)\n\n# Python supply-chain, live MCP probe/wrap, Control Plane E2E & cross-language Go↔Python suites\npytest tests/ -v\n```\n\n", "url": "https://wpnews.pro/news/show-hn-piton-lockfile-and-static-supply-chain-scanner-for-mcp-coding-agent", "canonical_source": "https://github.com/tony-stark2025/piton", "published_at": "2026-11-27 08:37:25+00:00", "updated_at": "2026-11-27 08:43:37.882625+00:00", "lang": "en", "topics": ["ai-agents", "agent-protocols", "ai-safety", "developer-tools", "ai-tools"], "entities": ["Piton", "piton-cli", "Claude Code", "Cursor", "Claude Desktop", "OpenCode", "OpenTelemetry", "Envoy"], "also_reported_by": [], "takeaway": "Piton pins MCP tools with split hashes — structural_sha256 on name plus inputSchema hard-blocked on all servers, description_sha256 hard-blocked only on third_party servers — so internal docstring edits warn instead of breaking CI.", "recommendation": null, "alternates": {"html": "https://wpnews.pro/news/show-hn-piton-lockfile-and-static-supply-chain-scanner-for-mcp-coding-agent", "markdown": "https://wpnews.pro/news/show-hn-piton-lockfile-and-static-supply-chain-scanner-for-mcp-coding-agent.md", "text": "https://wpnews.pro/news/show-hn-piton-lockfile-and-static-supply-chain-scanner-for-mcp-coding-agent.txt", "jsonld": "https://wpnews.pro/news/show-hn-piton-lockfile-and-static-supply-chain-scanner-for-mcp-coding-agent.jsonld"}}