| name | solana-security-audit |
| description | Perform security audit on Ginva Protocol - Check for vulnerabilities, access control, reentrancy, arithmetic safety, and best practices for Solana/Pinocchio programs |
| license | BUSL-1.1 |
Solana Security Audit Skill for Ginva Protocol
Use this skill to perform a comprehensive security audit on the Ginva protocol smart contract.
Quick Start
- First, scan the smart contract at
programs/ginva-pinocchio/src/
- Check for common vulnerability patterns
- Verify security controls are in place
- Document findings
Audit Checklist
1. Account Validation
2. Arithmetic Safety
3. Access Control
4. Reentrancy Protection
5. Oracle Security
6. Business Logic
Critical Patterns to Find
Type Cosplay
if account.mint != expected_mint {
return Err(GinvaError::InvalidMint);
}
Account Reloading
account.reload()?;
PDA Substitution
if !pda.eq(&derived_pda) {
return Err(GinvaError::InvalidPDA);
}
Arbitrary CPI
if ctx.accounts.dex.program != JUPITER {
return Err(GinvaError::InvalidProgram);
}
Audit Priority
- CRITICAL: Fund theft vectors
- HIGH: Logic bugs causing loss
- MEDIUM: Edge case failures
- LOW: Gas optimization
Files to Audit
programs/ginva-pinocchio/src/lib.rs - Main entry, constants, error codes
programs/ginva-pinocchio/src/instructions.rs - All instruction handlers
programs/ginva-pinocchio/src/accounts.rs - Account validation
programs/ginva-pinocchio/src/cpi.rs - Cross-program calls
Common Fixes in Ginva
- Reentrancy guards added to all state-modifying functions
- Checked arithmetic throughout
- Price staleness validation (15s max)
- Supply cap enforcement
- Emergency pause with timelock
Report Format
# Security Audit Report - Ginva Protocol
## Summary
[Overview of audit scope and findings]
## Critical Issues
[0 items]
## High Issues
[0 items]
## Medium Issues
[0 items]
## Recommendations
[Any improvements]
Use this skill when user asks to: audit, security review, check vulnerabilities, find bugs, or review smart contract security.