feat(solana): add recipient firewall against address poisoning - #153
Open
infser wants to merge 1 commit into
Open
feat(solana): add recipient firewall against address poisoning#153infser wants to merge 1 commit into
infser wants to merge 1 commit into
Conversation
ZeroClaw T0 tool plugin that verifies Solana recipients against an operator-pinned address book BEFORE any transaction is built. - Detects address poisoning (prefix+suffix lookalike detection) - Rejects blocked, invalid, or unknown addresses (fail-closed default) - Optional HOLD mode for valid-but-unknown (allow_unknown=true) - Prompt injection resistant: sanitizes candidate and claimed_contact - Pure core testable on host (58 tests, cargo test passes) - config_schema in manifest.toml (Draft 2020-12, additionalProperties:false) - config_read permission only (T0 custody) - Base58 validation in pure Rust (no Solana SDK dependency) Verification: - cargo fmt --all -- --check: OK - cargo test: 58 passed, 0 failed - cargo clippy --all-targets -- -D warnings: OK - cargo build --target wasm32-wasip2 --release: OK (183KB)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ZeroClaw T0 tool plugin that sits at the trust boundary BEFORE any Solana transaction is built. Verifies a candidate recipient address against an operator-pinned address book and detects address poisoning attacks.
Problem
AI agents and users can be victim of address poisoning: an attacker creates a Solana address with the same first/last N characters as a trusted contact, then tricks the agent into using it. Existing plugins build/simulate/guard transactions but none protect the recipient trust boundary.
Solution
The plugin checks every candidate address against the operator's address book:
Architecture
Follows plugins/redact-text as template:
Validation (real, executed)
cargo fmt --all -- --check PASS cargo test 58 passed (42 unit + 16 integration) cargo clippy --all-targets PASS (-D warnings) cargo build --target wasm32-wasip2 --release PASS (183KB)Config
AI Assistance Disclosure
Developed with AI assistance (DeepSeek/OpenClaw) for code generation and iteration. All code reviewed, tested, and validated by human author.
Closes: N/A (new plugin)