Skip to content

Security: stackedPenguin/manaswap-wallet

Security

docs/SECURITY.md

Security Review Checklist

Dependency Audit

  • ✅ All dependencies are from trusted sources (npm registry)
  • ✅ Regular dependency updates recommended
  • Run pnpm audit regularly to check for vulnerabilities

Manifest Permissions

  • storage - Required for vault and settings persistence
  • tabs - Required for network detection and dApp connectivity
  • scripting - Required for content script injection
  • activeTab - Minimal permission for tab access
  • host_permissions: <all_urls> - Required for dApp provider injection (standard for wallet extensions)

Permission Minimization: All permissions are necessary for core functionality. No excessive permissions granted.

Content Security Policy

  • ✅ Manifest V3 enforces strict CSP by default
  • ✅ No inline scripts (all code is bundled)
  • ✅ No eval() or similar dangerous functions
  • ✅ External resources only from trusted RPC endpoints

Key Management Security

  • ✅ Private keys encrypted with PBKDF2 (100,000 iterations) + AES-GCM
  • ✅ Keys stored in chrome.storage.local (encrypted at rest by Chrome)
  • ✅ Vault auto-locks after 15 minutes of inactivity
  • ✅ Password required for all sensitive operations
  • ✅ Private key reveal requires explicit password confirmation

Network Security

  • ✅ RPC endpoints are whitelisted (Solana and X1 official endpoints)
  • ✅ No arbitrary RPC URL acceptance
  • ✅ Network health monitoring with timeout protection

dApp Security

  • ✅ All connection requests require user approval
  • ✅ Transaction signing requires explicit approval
  • ✅ Permissions are per-origin and can be revoked
  • ✅ No automatic signing without user consent

Threat Modeling Notes

Attack Vectors Mitigated

  1. Phishing: User must approve all dApp connections and transactions
  2. Key Theft: Keys encrypted with strong password, auto-lock enabled
  3. Man-in-the-Middle: RPC endpoints are hardcoded, no arbitrary URLs
  4. Extension Hijacking: Minimal permissions, no external script loading
  5. Social Engineering: Clear warnings before sensitive operations

Remaining Risks

  • User must protect their password (no password recovery mechanism)
  • Physical access to unlocked device could compromise wallet
  • Malicious dApps could trick users into signing harmful transactions (mitigated by approval flow)

Recommendations

  1. Regular dependency audits (pnpm audit)
  2. Monitor for security advisories in dependencies
  3. Consider adding rate limiting for failed password attempts
  4. Consider adding transaction simulation before signing
  5. Regular security reviews before major releases

There aren't any published security advisories