Skip to content

chore(preflight): bump skill integrity pin for v4 + document new signing defenses - #316

Merged
szhygulin merged 2 commits into
mainfrom
chore/preflight-pin-bump-v4
Apr 27, 2026
Merged

chore(preflight): bump skill integrity pin for v4 + document new signing defenses#316
szhygulin merged 2 commits into
mainfrom
chore/preflight-pin-bump-v4

Conversation

@szhygulin

@szhygulin szhygulin commented Apr 27, 2026

Copy link
Copy Markdown
Collaborator

Summary

The vaultpilot-preflight skill (separate repo, lives under ~/.claude/skills/) gains Invariant #8 in v4 covering free-form message signing, and corrects an Invariant #7 overreach from v3. This PR carries the matching SHA-256 + sentinel pin bump in src/index.ts and the corresponding SECURITY.md update describing the new agent-side defenses.

Coordinated with szhygulin/vaultpilot-skill#5.

What changed in the skill (v3 → v4)

  1. Invariant Release v0.2.0 #8 (NEW) — free-form message-signing discipline. Address-book v1.0 (feat(contacts): address book v1.0 — BTC + EVM #284) introduced contacts-CRUD message signing; pre-existing sign_message_btc / sign_message_ltc tools also produce BIP-137 sigs over arbitrary UTF-8. v4 specifies the agent-side preview discipline for the free-form tools: render an explicit MESSAGE-PREVIEW block with the exact UTF-8 string before the device prompt, user matches character-by-character, treat any deviation as ✗ MESSAGE-PREVIEW MISMATCH — DO NOT SIGN. (Contacts CRUD signs a structurally-fixed JSON preimage that is NOT subject to char-by-char matching — its user-side defense is the recognizable domain prefix.)

  2. Invariant Fix Compound dust rendering and add tx simulation #7 carve-out fix. v3 said the contacts-CRUD tools are the only VaultPilot tools that legitimately trigger an on-device sign-MESSAGE prompt. That was wrong — sign_message_btc and sign_message_ltc (pre-existing public MCP tools) also legitimately trigger sign-message prompts. v3 would have caused agents to false-positive refuse on legitimate calls. v4 adds both to the legitimate-trigger list.

  3. Invariant Add CI workflow: typecheck + tests on Node 20/22 #1 (Safe note). One-liner clarifying Safe propose / approve / execute are standard EVM transactions (eth_sendTransaction of approveHash / execTransaction), not typed-data signing — so they need no special agent handling. Reinforces the existing decision to keep eth_signTypedData_v4 excluded from the WC namespace.

Pin changes in this PR

  • SHA-256:
    • old (v3): 21c8c60ac26528732dbe0b40b4be7e4790607db1881489fe4cd1751f75536cd6
    • new (v4): cd689838314a700dfff80d4c881bf51190cd6c71c747f3152e7cab8d943df2cc
  • Sentinel fragment B: _v3__v4_
  • Sentinel fragment C: 2d3b876b38550fe57655818578c7a044

The fragmented-pin format (A + B + C concatenation) keeps the literal sentinel string out of agent context — see the explanatory comment in src/index.ts at the pin site.

SECURITY.md changes

  • Address book "EVM signing trade-off (path C)" paragraph: now points at skill v4 Invariant Fix Compound dust rendering and add tx simulation #7 as the agent-side defense (decoration suffix + tamper-warning refusal + sign-message-during-prepare anomaly check + post-add_contact verify cross-check), explicitly noting the contacts JSON preimage is NOT subject to character-by-character matching.
  • New "Free-form message signing (sign_message_btc / sign_message_ltc)" section: describes the public sign-message surface, the substitution threat (concrete: user asks "I own bc1q...mine", MCP forwards "I authorize transfer of all funds to bc1q...attacker"), and skill v4 Invariant Release v0.2.0 #8's MESSAGE-PREVIEW block as the agent-side defense.
  • Notes EVM has no public free-form signer (personal_sign restricted to the contacts signer) and eth_signTypedData_v4 remains excluded from the WC namespace.

Test plan

  • npm install && npm run build clean in worktree
  • No leftover v3 references in src/index.ts (grep)
  • Local SHA-256 of ~/.claude/skills/vaultpilot-preflight/SKILL.md matches new pin
  • SECURITY.md attribution verified against the actual skill text (Invariant Fix Compound dust rendering and add tx simulation #7 carries the contacts-blob defense; Invariant Release v0.2.0 #8 is scoped to free-form signers, NOT contacts CRUD)
  • CI green
  • Skill PR (szhygulin/vaultpilot-skill#5) merged before merging this PR

🤖 Generated with Claude Code

szhygulin and others added 2 commits April 27, 2026 09:36
…iant)

The vaultpilot-preflight skill (separate repo, lives under
~/.claude/skills/) gains Invariant #8 in v4 — agent-side rules for
free-form message signing (sign_message_btc / sign_message_ltc and
the contacts-CRUD message signers). v4 also corrects Invariant #7's
overreach: v3 listed contacts CRUD as the *only* legitimate trigger
of an on-device sign-MESSAGE prompt, which would have caused agents
to false-positive refuse on legitimate sign_message_btc/ltc calls.
v4 carves both pre-existing tools into the legitimate-trigger list.
A one-liner under Invariant #1 also clarifies that Safe propose /
approve / execute are standard EVM transactions (eth_sendTransaction
of approveHash / execTransaction), not typed-data signing — so they
need no special agent handling.

The skill content change shifts both the SHA-256 of SKILL.md and
the in-file integrity sentinel. Update the pin in this MCP's source
so the on-each-flow integrity check the MCP delegates to the agent
succeeds against the new skill version.

  - SHA-256:
      21c8c60ac26528732dbe0b40b4be7e4790607db1881489fe4cd1751f75536cd6 (old, v3)
    → cd689838314a700dfff80d4c881bf51190cd6c71c747f3152e7cab8d943df2cc (new, v4)
  - Sentinel fragment B: _v3_ → _v4_
  - Sentinel fragment C: 2d3b876b38550fe5 → 7655818578c7a044

Coordinated with the matching PR in szhygulin/vaultpilot-security-skill#5.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
The address-book PR (#284) and the pre-existing sign_message_btc /
sign_message_ltc tools together expand the signing surface beyond
sign-transaction flows. SECURITY.md previously covered only the
contacts blob signing trade-off (path C) and did not describe the
free-form public sign-message tools at all.

This commit:
  - Updates the contacts "EVM signing trade-off" paragraph to point
    at skill v4 Invariant #7 as the agent-side defense (decoration,
    tamper warning, sign-message-during-prepare anomaly check, post-
    add_contact verify cross-check), correctly attributing the
    contacts JSON preimage as NOT subject to character-by-character
    matching (its user-side defense is the recognizable domain
    prefix + JSON shape, per the skill's own carve-out).
  - Adds a new "Free-form message signing" section describing the
    public sign_message_btc / sign_message_ltc tools, the substitution
    threat, and skill v4 Invariant #8's MESSAGE-PREVIEW block as the
    agent-side defense (the user verifies the previewed string
    against the device screen character-by-character).
  - Notes that EVM has no equivalent public free-form signer
    (personal_sign is restricted to the contacts signer) and
    eth_signTypedData_v4 remains excluded from the WC namespace.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@szhygulin szhygulin changed the title chore(preflight): bump skill integrity pin for v4 (sign-message invariant) chore(preflight): bump skill integrity pin for v4 + document new signing defenses Apr 27, 2026
@szhygulin
szhygulin merged commit d07aab8 into main Apr 27, 2026
4 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators Apr 27, 2026
@szhygulin
szhygulin deleted the chore/preflight-pin-bump-v4 branch May 19, 2026 04:24
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant