/auditsentry:cross-chain-messagingfrom auditsentry
Detects cross-chain messaging vulnerabilities in Solidity: replay protection gaps, untrusted remote acceptance, config inheritance, chainId mismatches, and more. Activates on bridge integration code.
Ships in auditsentry. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
_lzReceive accepts any remote (CRITICAL — LayerZero)function _lzReceive(bytes calldata srcAddr, bytes calldata payload) internal {
// no allowlist of trusted remote
_executeMint(payload); // ← any chain can mint
}
Required: require(trustedRemote[srcChainId] == srcAddr).
ccipReceive callable directly (CRITICAL)function ccipReceive(Any2EVMMessage calldata m) external { // ← public, no router check
_execute(m.data);
}
Required: require(msg.sender == address(router)).
handle without ISM check (CRITICAL)Hyperlane's default ISM is permissive. Apps must set their own. If handle is called by mailbox without app-side validation, anyone can spoof messages.
function complete(bytes calldata vaa) external {
IWormhole.VM memory vm = wormhole.parseAndVerifyVM(vaa);
_mint(vm.payload.to, vm.payload.amount); // ← no per-VAA seen check
}
Required: track usedVAAs[vm.hash] = true after first use.
Same payload accepted on multiple destination chains. Include destination chainId in the signed/verified payload.
Application doesn't set explicit DVN set (LayerZero V2) or ISM (Hyperlane). Default configs are often weak. Look for explicit setSendLibrary, setReceiveLibrary, setEnforcedOptions, setInterchainSecurityModule.
LayerZero EIDs ≠ chainIds. CCIP uses chainSelectors. Map wrong → message goes to wrong chain or stuck forever.
_lzSend / _options (MEDIUM)Receiver runs out of gas → message stuck (LayerZero V2 retry semantics).
Anyone can force-include an L1→L2 transaction. If app assumes only sequencer can trigger certain flows, force-include breaks the assumption.
Optimism: 7-day challenge. Arbitrum: 7-day. App that assumes funds arrive instantly L2→L1 → invariant broken.
Single pause for all routes vs per-route → over- or under-blast-radius.
_lzReceive triggering a compose call back into lzCompose re-enters during the same message. Treat composed messages as reentrant calls.
If setTrustedRemote is onlyOwner and owner is an EOA, the bridge can be silently rerouted. See [[centralization-risk]].
| Pattern | Severity |
|---|---|
| Receive function accepts any remote | Critical |
| Receive function callable directly (not router/mailbox) | Critical |
| VAA / message not marked seen → double-spend | Critical |
| Cross-chain replay (no destination chainId binding) | Critical |
| Default ISM / DVN config (no app-side override) | High |
| chainId/EID/chainSelector mapping mistake | High |
| Compose reentrancy in LayerZero V2 | High |
| Force-include L1→L2 assumption | High |
| L2→L1 withdrawal-delay assumption | Medium |
| Single-key trusted-remote update authority | High |
| Insufficient gas in send → message stuck | Medium |
msg.sender == router/mailbox/endpoint.srcChain and srcAddress against an allowlist.(srcChain, srcAddr, nonce/hash).ccipReceive.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
cross-chain, bridge-security, solidity-audit, layerzero, wormhole, hyperlane
npx claudepluginhub iktok90-design/ai-smart-contract-auditor --plugin auditsentry45 skills in this plugin
/access-controlDetect missing or incorrect access control — missing modifiers, wrong role checks, privileged function exposure, public initializers, and role-escalation paths. Activate on any function that mutates state, transfers funds, mints tokens, sets admin parameters, upgrades implementations, or pauses/unpauses./approval-issuesDetect ERC-20 approval pitfalls — approve race (front-run), missing safeApprove, infinite approvals, approval-without-revoke, Permit2 misuse, max-approval to untrusted contracts. Activate on `approve`, `safeApprove`, `permit`, `forceApprove`, `Permit2`, `IERC20.allowance`./caching-and-incrementalAlways-on meta-skill — cache audit results per file by content hash so unchanged files aren't re-analyzed on subsequent runs. Activate on every /audit, /quick-scan, /audit-changes invocation.Other plugins' skills for the same job