This skill conducts automated and manual NEAR contract audits to identify vulnerabilities and guide secure Rust smart contract fixes.
npx playbooks add skill near/agent-skills --skill near-contract-audit
Security audit skill for NEAR smart contracts in Rust.
Run your preferred Rust static analysis and NEAR-focused security tools on the contract to:
After automated analysis, perform manual review for:
For each finding, verify:
Document findings with severity, location, description, and remediation.
| Severity | Detector ID | Description |
| ---------- | -------------------------------- | ----------------------------------------------- |
| High | non-private-callback | Callback missing #[private] macro |
| High | reentrancy | State change after cross-contract call |
| High | incorrect-argument-or-return-types | Using native integer types in JSON interfaces |
| High | unsaved-changes | Collection modifications not persisted |
| High | owner-check | Missing caller/owner verification |
| High | yocto-attach | Missing assert_one_yocto on sensitive functions |
| High | storage-collision | Same storage prefix for different collections |
| High | required-initialization-macro | Missing #[init] on initialization method |
| Medium | gas-griefing | Unbounded loops causing DoS |
| Medium | insecure-random | Predictable randomness from block data |
| Medium | prepaid-gas | Insufficient gas reserved for callbacks |
| Low | cover-storage-cost | Missing storage deposit verification |
| Low | unsafe-math | Arithmetic without overflow checks |
| Low | float-math | Using floating point types for financial math |
For detailed vulnerability documentation with code examples:
Weekly roundup of top Claude Code skills, MCP servers, and AI coding tips.