Repository navigation
feat(token_security_scanner): operator policy and policy_action (#393) - #425
Conversation
Hosts can tune tax and holder thresholds and gate trades on policy_action without forking the v0.1 risk tiers.
CI requires every examples script to be in the offline smoke list.
rosspeili
left a comment
There was a problem hiding this comment.
Fantastic upgrade @Hendobox! 🚀
Tip
Process Reminder regarding PR Templates for next time:
The PR body content is great and thorough, but please remember to use the official repository template (.github/PULL_REQUEST_TEMPLATE.md) rather than crafting custom headings, this helps conformity and audit logs.
Best practice: While AI agents can write, commit, and push branch code, PRs should ideally be opened and filled manually by contributors. Still, if you want your AI assistant to open or fill the PR description, instruct the agent to populate the standard .github/PULL_REQUEST_TEMPLATE.md checklist and sections verbatim.
I will merge this as is, resolve a changelog minor conflict and commit history in skill doc post merge <3
Summary
defi/token_security_scannerto v0.2.0. Every successful scan now includespolicy_action,policy_profile,report_schema_version, andreport_id. The bundledenterprise_defaultprofile keeps the v0.1 tiers (critical/high/unknown→block,medium→flag,low→allow).~/.config/skillware/token_scan_policy.yaml,TOKEN_SCAN_POLICY_PATH, or a per-callpolicy_path(tax cutoff, closed-source unknown honeypot, minimum holder count).scanaccepts anevm.tokensslug such asdegenon base.supported_chainsmarks chains GoPlus does not cover.scan_batchruns up to 5 sequential scans and returnsworst_risk_tier. HTTP 429 and 5xx retry once, then fail closed.Fixes #393
Test plan
high_tax_pct: 5turns a 6% buy tax fromflagintoblocktoken: degenon base resolves to the bundled addressgoplus_supported: false, and scanning Sepolia fails closedscan_batchof clean / honeypot / medium reports worst tiercriticalpytest skills/defi/token_security_scanner/test_skill.py tests/test_card_ui_schema.py tests/test_registry_docs.py tests/test_security_audit.pypython examples/token_security_scanner_demo.py(offline)