cd /news/ai-agents/show-hn-piton-lockfile-and-static-su… · home › topics › ai-agents › article
[ARTICLE · art-177159] src=github.com ↗ pub= topic=ai-agents verified=true sentiment=↑ positive

Show HN: Piton Lockfile and static supply-chain scanner for MCP/coding agent

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.

key 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.

read5 min views7 publishedNov 27, 2026
Show HN: Piton Lockfile and static supply-chain scanner for MCP/coding agent
Image: Michielbdejong (auto-discovered)

Lockfile and static supply-chain scanner for MCP servers, Claude Code hooks, and Cursor rules.

Don't wrap your agents in a probabilistic prompt firewall. Hammer deterministic split-hash pins into every MCP tool, Claude/Cursor hook, and schema.

Every 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.

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.

Slim Python CLI — only 2 runtime dependencies (pydantic + pyyaml):

uvx piton-cli scan --repo .

pipx install piton-cli   # or: pip install piton-cli

piton scan --repo .

piton init --repo . --probe

piton wrap --enforce --server github -- npx -y @modelcontextprotocol/server-github
- name: Piton — AI Agent Supply-Chain & MCP Lockfile Gate
  uses: Tony-Stark2025/piton@v0.4.2
  with:
    scan-only: "true" # or `probe: "true"` / `manifest: observed_tools.json` for MCP lockfile diffs

Fails pull requests loudly on:

  • Third-party MCP rug pulls (description_sha256 drift onthird_party servers)
  • Structural inputSchema drift (structural_sha256 drift onall servers—whileinternal docstring edits only warn so you never break deploys)
  • Cross-server tool shadowing (duplicate tool names across distinct MCP servers)
  • Day-1 MCP tool poisoning (NFKC homoglyphs, zero-width/bidi Unicode, covert tags, exfil directives)
  • Coding-agent config RCE (.claude/settings.json`` curl|sh / reverse shell / credential-harvesting hooks, unsafeBash(*) wildcards,.vscode/tasks.json`` folderOpen autorun, poisoned.cursor/rules & skill files)
  1. 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 + structuralinputSchema , always hard-blocked) from prose hashes (description + property descriptions: hard-blocked onthird_party MCPs, warning-only oninternal MCPs unless poisoning lint triggers).
  2. Shadow-to-Enforce Policy Calibration (piton replay) — The #1 reason teams disable agent security proxies is false blocks and hand-writing policy. Piton recordsPII-preserving tokenized traces (alice@acme.com →tok_8f1a2b3c@acme.com , keeping domains and numeric ceilings replayable without storing raw PII) OR ingests existingOpenTelemetry (OTel) JSONL spans , replays them offline to compute exact false-block rates, and exports calibrated policies straight to your existing gateway:
piton replay --config piton.yaml --traces .piton/traces.jsonl --simulate-enforce

piton replay --config piton.yaml --traces .piton/traces.jsonl --export cel
piton replay --config piton.yaml --traces .piton/traces.jsonl --export cedar

Runs 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:

git clone https://github.com/Tony-Stark2025/piton.git
cd piton
python3 -m venv .venv && source .venv/bin/activate
pip install -e ".[dev]"
bash examples/quickstart-billing-agent/run_demo.sh

When 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:

  [ Repo / CI ] ──► piton scan + piton init --probe ──► piton.yaml + piton.lock
                                                                │
  [ Envoy / agentgateway / Agent ] ◄──► [ Go Sidecar (Envoy v3 ext_proc gRPC + /mcp + /gw) ]
                                           • RS256/ES256 OIDC JWKS + RFC 8693 OBO (`sub`/` act`)
                                           • Live tools/list Rug-Pull Pin (`BodyMutation` -32001)
                                           • Declarative Response Projection (token & exfil reduction)
                                           • MCP 2026-07-28 MRTR `input_required` + signed approval retry
                                           • Optional Redis/Valkey shared 1h budgets across K8s replicas
                                           • Sliding-window multi-encoding secret scrubber
                                                                │
                                                                ▼
                                        [ Piton Control Plane (`piton control-plane`) ]
                                           • Slack Block Kit & Web UI MRTR Approval Bridge
                                           • Multi-Pod Signed Ledger Collector (Go↔Python HMAC)
                                           • Per-Agent Shadow→Enforce Readiness Scorecards
                                           • Tamper-Evident Signed SOC2 / EU AI Act Audit Export
helm install piton-sidecar ./deploy/helm/piton-sidecar \
  --set image.repository=ghcr.io/tony-stark2025/piton-sidecar \
  --set secrets.existingSecret=piton-sidecar-keys \
  --set redis.enabled=true \
  --set redis.addr=redis-master.default.svc.cluster.local:6379 \
  --set controlPlane.collectorUrl=http://piton-control-plane:8090 \
  --set envoyGateway.enabled=true \
  --set envoyGateway.targetRef.name=mcp-agents-route

Every 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:

cd deploy/envoy-e2e
docker compose up -d --build
python3 verify_envoy_e2e.py
docker compose down -v
PITON_LEDGER_SIGNING_KEY="dev-secret-key-32-bytes-minimum" \
  piton control-plane --host 127.0.0.1 --port 8090

PITON_LEDGER_SIGNING_KEY="dev-secret-key-32-bytes-minimum" \
  piton run --collector-url http://127.0.0.1:8090 -- python my_agent.py
piton scan --repo .                                         # Scan Claude/Cursor hooks, tasks, rules & skills
piton init --repo . [--probe] [--manifest tools.json]       # Generate piton.yaml (shadow), piton.lock & .env.agent
piton lock --diff [--probe | --manifest tools.json]         # PR gate: split-hash drift + shadowing + hook RCE
piton lock --update [--probe | --manifest tools.json]       # Refresh approved lockfile hashes after review
piton wrap --server <name> -- <stdio-mcp-cmd>               # Runtime STDIO pin & bounds for Cursor / Claude Code
piton replay --simulate-enforce [--export cel|cedar]        # Calibrate bounds from ledger or OTel spans
piton run [--collector-url URL] -- <agent-cmd>              # Zero-secret local agent runner (auto-fetches sidecar)
piton top --traces .piton/traces.jsonl [--follow]      # Live PII-tokenized flight recorder
piton ledger-verify --traces .piton/traces.jsonl       # Verify Go↔Python HMAC chain integrity
piton control-plane --host 127.0.0.1 --port 8090            # Fleet ledger collector, MRTR bridge & SOC2 export UI
(cd sidecar && go test -race -v ./...)

pytest tests/ -v
── more in #ai-agents 4 stories · sorted by recency
── more on @piton 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/show-hn-piton-lockfi…] indexed:0 read:5min 2026-11-27 · —