solana-security — community solana-security, hush-private-bookmarks, community, ide skills

v1.0.0

About this Skill

Perfect for Blockchain Agents focused on Solana ecosystem security, needing systematic review frameworks for Anchor and native Rust implementations. Audit Solana programs (Anchor or native Rust) for security vulnerabilities. Use when reviewing smart contract security, finding exploits, analyzing attack vectors, performing security assessments, or

mwathiben mwathiben
[0]
[0]
Updated: 3/5/2026

Killer-Skills Review

Decision support comes first. Repository text comes second.

Reference-Only Page Review Score: 7/11

This page remains useful for operators, but Killer-Skills treats it as reference material instead of a primary organic landing page.

Original recommendation layer Concrete use-case guidance Explicit limitations and caution Locale and body language aligned
Review Score
7/11
Quality Score
42
Canonical Locale
en
Detected Body Locale
en

Perfect for Blockchain Agents focused on Solana ecosystem security, needing systematic review frameworks for Anchor and native Rust implementations. Audit Solana programs (Anchor or native Rust) for security vulnerabilities. Use when reviewing smart contract security, finding exploits, analyzing attack vectors, performing security assessments, or

Core Value

Empowers agents to conduct comprehensive security audits of Solana programs, supporting both Anchor and native Rust, with a systematic 5-step review process that checks for framework compatibility, Anchor version, and dependencies like Oracle.

Ideal Agent Persona

Perfect for Blockchain Agents focused on Solana ecosystem security, needing systematic review frameworks for Anchor and native Rust implementations.

Capabilities Granted for solana-security

Auditing Solana smart contracts for security vulnerabilities
Analyzing Anchor and native Rust implementations for compatibility issues
Identifying potential security risks in Solana program dependencies

! Prerequisites & Limits

  • Requires knowledge of Solana ecosystem and programming languages like Rust
  • Limited to Solana programs and does not support other blockchain platforms

Why this page is reference-only

  • - The underlying skill quality score is below the review floor.

Source Boundary

The section below is imported from the upstream repository and should be treated as secondary evidence. Use the Killer-Skills review above as the primary layer for fit, risk, and installation decisions.

After The Review

Decide The Next Action Before You Keep Reading Repository Material

Killer-Skills should not stop at opening repository instructions. It should help you decide whether to install this skill, when to cross-check against trusted collections, and when to move into workflow rollout.

Labs Demo

Browser Sandbox Environment

⚡️ Ready to unleash?

Experience this Agent in a zero-setup browser environment powered by WebContainers. No installation required.

Boot Container Sandbox

FAQ & Installation Steps

These questions and steps mirror the structured data on this page for better search understanding.

? Frequently Asked Questions

What is solana-security?

Perfect for Blockchain Agents focused on Solana ecosystem security, needing systematic review frameworks for Anchor and native Rust implementations. Audit Solana programs (Anchor or native Rust) for security vulnerabilities. Use when reviewing smart contract security, finding exploits, analyzing attack vectors, performing security assessments, or

How do I install solana-security?

Run the command: npx killer-skills add mwathiben/hush-private-bookmarks/solana-security. It works with Cursor, Windsurf, VS Code, Claude Code, and 19+ other IDEs.

What are the use cases for solana-security?

Key use cases include: Auditing Solana smart contracts for security vulnerabilities, Analyzing Anchor and native Rust implementations for compatibility issues, Identifying potential security risks in Solana program dependencies.

Which IDEs are compatible with solana-security?

This skill is compatible with Cursor, Windsurf, VS Code, Trae, Claude Code, OpenClaw, Aider, Codex, OpenCode, Goose, Cline, Roo Code, Kiro, Augment Code, Continue, GitHub Copilot, Sourcegraph Cody, and Amazon Q Developer. Use the Killer-Skills CLI for universal one-command installation.

Are there any limitations for solana-security?

Requires knowledge of Solana ecosystem and programming languages like Rust. Limited to Solana programs and does not support other blockchain platforms.

How To Install

  1. 1. Open your terminal

    Open the terminal or command line in your project directory.

  2. 2. Run the install command

    Run: npx killer-skills add mwathiben/hush-private-bookmarks/solana-security. The CLI will automatically detect your IDE or AI agent and configure the skill.

  3. 3. Start using the skill

    The skill is now active. Your AI agent can use solana-security immediately in the current project.

! Reference-Only Mode

This page remains useful for installation and reference, but Killer-Skills no longer treats it as a primary indexable landing page. Read the review above before relying on the upstream repository instructions.

Upstream Repository Material

The section below is imported from the upstream repository and should be treated as secondary evidence. Use the Killer-Skills review above as the primary layer for fit, risk, and installation decisions.

Upstream Source

solana-security

Install solana-security, an AI agent skill for AI agent workflows and automation. Review the use cases, limitations, and setup path before rollout.

SKILL.md
Readonly
Upstream Repository Material
The section below is imported from the upstream repository and should be treated as secondary evidence. Use the Killer-Skills review above as the primary layer for fit, risk, and installation decisions.
Supporting Evidence

Solana Security Auditing

Systematic security review framework for Solana programs, supporting both Anchor and native Rust implementations.

Review Process

Follow this systematic 5-step process for comprehensive security audits:

Step 1: Initial Assessment

Understand the program's context and structure:

  • Framework: Anchor vs Native Rust (check for use anchor_lang::prelude::*)
  • Anchor version: Check Cargo.toml for compatibility and known issues
  • Dependencies: Oracles (Pyth, Switchboard), external programs, token programs
  • Program structure: Count instructions, identify account types, analyze state management
  • Complexity: Lines of code, instruction count, PDA patterns
  • Purpose: DeFi, NFT, governance, gaming, etc.

Step 2: Systematic Security Review

For each instruction, perform security checks in this order:

  1. Account Validation - Verify signer, owner, writable, and initialization checks
  2. Arithmetic Safety - Check all math operations use checked_* methods
  3. PDA Security - Validate canonical bumps and seed uniqueness
  4. CPI Security - Ensure cross-program invocations validate target programs
  5. Oracle/External Data - Verify price staleness and oracle status checks

→ See references/security-checklists.md for detailed checklists

Step 3: Vulnerability Pattern Detection

Scan for common vulnerability patterns:

  • Type cosplay attacks
  • Account reloading issues
  • Improper account closing
  • Missing lamports checks
  • PDA substitution attacks
  • Arbitrary CPI vulnerabilities
  • Missing ownership validation
  • Integer overflow/underflow

→ See references/vulnerability-patterns.md for code examples and exploit scenarios

Step 4: Architecture and Testing Review

Evaluate overall design quality:

  • PDA design patterns and collision prevention
  • Account space allocation and rent exemption
  • Error handling approach and coverage
  • Event emission for critical state changes
  • Compute budget optimization
  • Test coverage (unit, integration, fuzz)
  • Upgrade strategy and authority management

Step 5: Generate Security Report

Provide findings using this structure:

Severity Levels:

  • 🔴 Critical: Funds can be stolen/lost, protocol completely broken
  • 🟠 High: Protocol can be disrupted, partial fund loss possible
  • 🟡 Medium: Suboptimal behavior, edge cases, griefing attacks
  • 🔵 Low: Code quality, gas optimization, best practices
  • 💡 Informational: Recommendations, improvements, documentation

Finding Format:

markdown
1## 🔴 [CRITICAL] Title 2 3**Location:** `programs/vault/src/lib.rs:45-52` 4 5**Issue:** 6Brief description of the vulnerability 7 8**Vulnerable Code:** 9```rust 10// Show the problematic code

Exploit Scenario: Step-by-step explanation of how this can be exploited

Recommendation:

rust
1// Show the secure alternative

References:

  • [Link to relevant documentation or similar exploits]

**Report Summary:**
- Total findings by severity
- Critical issues first (prioritize by risk)
- Quick wins (easy fixes with high impact)
- Recommendations for testing improvements

## Quick Reference

### Essential Checks (Every Instruction)

**Anchor:**
```rust
// ✅ Account validation with constraints
#[derive(Accounts)]
pub struct SecureInstruction<'info> {
    #[account(
        mut,
        has_one = authority,  // Relationship check
        seeds = [b"vault", user.key().as_ref()],
        bump,  // Canonical bump
    )]
    pub vault: Account<'info, Vault>,

    pub authority: Signer<'info>,  // Signer required

    pub token_program: Program<'info, Token>,  // Program validation
}

// ✅ Checked arithmetic
let total = balance.checked_add(amount)
    .ok_or(ErrorCode::Overflow)?;

Native Rust:

rust
1// ✅ Manual account validation 2if !authority.is_signer { 3 return Err(ProgramError::MissingRequiredSignature); 4} 5 6if vault.owner != program_id { 7 return Err(ProgramError::IllegalOwner); 8} 9 10// ✅ Checked arithmetic 11let total = balance.checked_add(amount) 12 .ok_or(ProgramError::ArithmeticOverflow)?;

Critical Anti-Patterns

Never Do:

  • Use saturating_* arithmetic methods (hide errors)
  • Use unwrap() or expect() in production code
  • Use init_if_needed without additional checks
  • Skip signer validation ("they wouldn't call this...")
  • Use unchecked arithmetic operations
  • Allow arbitrary CPI targets
  • Forget to reload accounts after mutations

Always Do:

  • Use checked_* arithmetic (checked_add, checked_sub, etc.)
  • Use ok_or(error)? for Option unwrapping
  • Use explicit init with proper validation
  • Require Signer<'info> or is_signer checks
  • Use Program<'info, T> for CPI program validation
  • Reload accounts after external calls that mutate state
  • Validate account ownership, discriminators, and relationships

Framework-Specific Patterns

Anchor Security Patterns

→ See references/anchor-security.md for:

  • Account constraint best practices
  • Common Anchor-specific vulnerabilities
  • Secure CPI patterns with CpiContext
  • Event emission and monitoring
  • Custom error handling

Native Rust Security Patterns

→ See references/native-security.md for:

  • Manual account validation patterns
  • Secure PDA derivation and signing
  • Low-level CPI security
  • Account discriminator patterns
  • Rent exemption validation

Modern Practices (2025)

  • Use Anchor 0.30+ for latest security features
  • Implement Token-2022 with proper extension handling
  • Use InitSpace derive for automatic space calculation
  • Emit events for all critical state changes
  • Write fuzz tests with Trident framework
  • Document invariants in code comments
  • Follow progressive roadmap: Dev → Audit → Testnet → Audit → Mainnet

Security Fundamentals

→ See references/security-fundamentals.md for:

  • Security mindset and threat modeling
  • Core validation patterns (signers, owners, mutability)
  • Input validation best practices
  • State management security
  • Arithmetic safety
  • Re-entrancy considerations

Common Vulnerabilities

→ See references/vulnerability-patterns.md for:

  • Missing signer validation
  • Integer overflow/underflow
  • PDA substitution attacks
  • Account confusion
  • Arbitrary CPI
  • Type cosplay
  • Improper account closing
  • Precision loss in calculations

Each vulnerability includes:

  • ❌ Vulnerable code example
  • 💥 Exploit scenario
  • ✅ Secure alternative
  • 📚 References

Security Checklists

→ See references/security-checklists.md for:

  • Account validation checklist
  • Arithmetic safety checklist
  • PDA and account security checklist
  • CPI security checklist
  • Oracle and external data checklist
  • Token integration checklist

Known Issues and Caveats

→ See references/caveats.md for:

  • Solana-specific quirks and gotchas
  • Anchor framework limitations
  • Testing blind spots
  • Common misconceptions
  • Version-specific issues

Security Resources

→ See references/resources.md for:

  • Official security documentation
  • Security courses and tutorials
  • Vulnerability databases
  • Audit report examples
  • Security tools (Trident, fuzzers)
  • Security firms and auditors

Key Questions for Every Audit

Always verify these critical security properties:

  1. Can an attacker substitute accounts?

    • PDA validation, program ID checks, has_one constraints
  2. Can arithmetic overflow or underflow?

    • All math uses checked operations, division by zero protected
  3. Are all accounts properly validated?

    • Owner, signer, writable, initialized checks present
  4. Can the program be drained?

    • Authorization checks, reentrancy protection, account confusion prevention
  5. What happens in edge cases?

    • Zero amounts, max values, closed accounts, expired data
  6. Are external dependencies safe?

    • Oracle validation (staleness, status), CPI targets verified, token program checks

Audit Workflow

Before Starting

  1. Understand the protocol purpose and mechanics
  2. Review documentation and specifications
  3. Set up local development environment
  4. Run existing tests and check coverage

During Audit

  1. Follow the 5-step review process systematically
  2. Document findings with severity and remediation
  3. Create proof-of-concept exploits for critical issues
  4. Test fixes and verify they work

After Audit

  1. Present findings clearly prioritized by severity
  2. Provide actionable remediation steps
  3. Re-audit after fixes are implemented
  4. Document lessons learned for the protocol

Testing for Security

Beyond code review, validate security through testing:

  • Unit tests: Test each instruction's edge cases
  • Integration tests: Test cross-instruction interactions
  • Fuzz testing: Use Trident to discover unexpected behaviors
  • Exploit scenarios: Write POCs for found vulnerabilities
  • Upgrade testing: Verify migration paths are secure

Core Principle

In Solana's account model, attackers can pass arbitrary accounts to any instruction.

Security requires explicitly validating:

  • ✅ Every account's ownership
  • ✅ Every account's type (discriminator)
  • ✅ Every account's relationships
  • ✅ Every account's state
  • ✅ Every signer requirement
  • ✅ Every arithmetic operation
  • ✅ Every external call

There are no implicit guarantees. Validate everything, trust nothing.

Related Skills

Looking for an alternative to solana-security or another community skill for your workflow? Explore these related open-source skills.

View All

openclaw-release-maintainer

Logo of openclaw
openclaw

Your own personal AI assistant. Any OS. Any Platform. The lobster way. 🦞

333.8k
0
AI

widget-generator

Logo of f
f

Generate customizable widget plugins for the prompts.chat feed system

149.6k
0
AI

flags

Logo of vercel
vercel

The React Framework

138.4k
0
Browser

pr-review

Logo of pytorch
pytorch

Tensors and Dynamic neural networks in Python with strong GPU acceleration

98.6k
0
Developer