Token risk check - #146
Draft
alrimarleskovar wants to merge 7 commits into
Draft
Conversation
…, fail-closed, 12 host tests)
…ecedence, honest not_checked, 31 host tests)
…rompt-injection defense (fails closed by construction, 46 host tests)
…ed, honest about token-accounts-vs-owners, 56 host tests)
…section, install enable note)
…persona files + reproduction guide)
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.
token-risk-check (Track D) — T0
A Solana token-risk-check tool plugin: given a mint, returns a fail-closed red/amber/green verdict over on-chain facts.
What it checks
Safety design (the point of the plugin)
classify()never receives token metadata — so attacker-controlled name/symbol/uri cannot influence it. Injection fails closed by construction, not by defense. Self-declared metadata is returned quarantined inuntrusted_metadatawith a warning.checks_performed/not_checkedin every result (LP status and metadata mutability are declared unchecked).Custody: T0 — read-only. Never builds, signs, or submits a transaction; never holds a key; never touches funds. Only possible secret is an RPC key via
config_read.Status: core complete, 56 host tests passing (mocked RPC, no network), builds clean for
wasm32-wasip2. Opening as draft while I wire up a live host demo — feedback welcome, especially on the WIT usage and anything blocking merge-readiness.Pure-core/thin-shim split, mirrors
redact-text. Structured logging vialog-record. MIT.