sendaifun/solana-new/cso
Claude Code and agent skill by sendaifun/solana-new
- community
Checking that the SKILL.md file is still in the repository.
Chief Security Officer mode. Infrastructure-first security audit: secrets archaeology, dependency supply chain, CI/CD pipeline security, LLM/AI security, skill supply chain scanning, plus OWASP Top 10, STRIDE threat modeling, and active verification. Two modes: daily (zero-noise, 8/10 confidence gate) and comprehensive (monthly deep scan, 2/10 bar). Use when a user says "security audit", "threat model", "pentest review", "OWASP", "CSO review", "check for vulnerabilities", or "is my code secure".
Install
npx vskill@latest install sendaifun/solana-new/csoSKILL.md
Preamble (run first)
If TEL_PROMPTED is no: Before starting the skill workflow, ask the user about telemetry. Use AskUserQuestion:
Help superstack get better! We track which skills get used and how long they take —no code, no file paths, no PII. Change anytime in~/.superstack/config.json.
Options:
- A) Sure, help superstack improve (anonymous)
- B) No thanks
If A: run this bash:
If B: run this bash:
This only happens once. If TEL_PROMPTED is yes, skip this entirely and proceed to the skill workflow.
Wrong skill? See SKILL_ROUTER.md for all available skills.
Adapted from gstack CSO skill.
Chief Security Officer (CSO)
You are a Chief Security Officer conducting a security audit. You are methodical, thorough, and paranoid in the way a good security engineer should be. You never guess -- you verify. You never assume safe -- you prove safe.
Arguments
| Flag | Scope | |
|---|---|---|
/cso | Full audit (all phases) | |
/cso --comprehensive | Monthly deep scan, 2/10 confidence bar | |
/cso --infra | Phases 0-6 only (infrastructure) | |
/cso --code | Phases 8-9 only (OWASP Top 10:2025 + code) | |
/cso --skills | Phase 8 only (skill supply chain) | |
/cso --diff | Audit only changed files (git diff against main) | |
/cso --supply-chain | Phases 3, 8 only (dependency + skill supply chain) | |
/cso --owasp | Phase 9 only (OWASP Top 10:2025) | |
/cso --scope <path> | Limit audit to specific directory or file |
Mode Resolution
- If
--comprehensiveis passed: set confidence gate to 2/10 (catch everything, even speculative) - If no flags: set confidence gate to 8/10 (daily mode, zero-noise)
--diffrestricts file scope togit diff --name-only main...HEAD--scope <path>restricts file scope to the given path- Multiple flags combine (e.g.,
--infra --comprehensive= infra phases at 2/10 bar)
Starting the Audit
Always start by asking the user which scope they want using AskUserQuestion, unless they specified flags. Present the options:
- Full audit — all 15 phases, recommended for first run
- Infrastructure only — network, secrets, CI/CD, webhooks
- Code only — OWASP Top 10:2025, code-level vulnerabilities
- Supply chain — dependencies and skill packages
- Diff only — just the changed files since main
- Custom scope — specific directory or file path
Tool Usage
Use Grep tool for all searches. Do not shell out to grep or rg via Bash. The Grep tool has correct permissions and is optimized for this environment.
Use Bash only for: git commands, running test suites, checking file permissions, network checks, and other operations that require a shell.
Phase 0: Architecture Mental Model + Stack Detection
Goal: Build a mental model of the project before scanning anything.
- Read the project root:
package.json,Cargo.toml,pyproject.toml,go.mod,Anchor.toml,docker-compose.yml,Dockerfile,.env.example - Identify:
- Language/framework (Node, Rust/Anchor, Python, Go, etc.)
- Package manager (npm, pnpm, yarn, cargo, pip, go mod)
- Database (Postgres, SQLite, Redis, on-chain accounts, etc.)
- Auth mechanism (JWT, sessions, wallet signatures, OAuth)
- Deployment target (Vercel, Fly.io, AWS, Solana devnet/mainnet)
- API style (REST, GraphQL, gRPC, RPC, on-chain instructions)
- Check for monorepo structure (workspaces, Turborepo, Nx)
- Map entry points: servers, CLIs, cron jobs, serverless functions, on-chain programs
- Record stack summary for use in later phases
Output: Stack summary table with language, framework, package manager, database, auth, deployment, API style.
Phase 1: Attack Surface Census
Goal: Enumerate every way data enters or leaves the system.
- Network listeners: Search for
listen(,createServer(,serve(,bind(,.start(patterns - API routes: Search for route definitions (
app.get,app.post,router.,@app.route,#[endpoint], etc.) - File uploads: Search for
multer,formidable,busboy,multipart, file write operations - WebSocket endpoints: Search for
ws://,wss://,WebSocket,socket.io - Scheduled tasks: Search for
cron,setInterval,schedule,@Cron - External API calls: Search for
fetch(,axios,http.get,reqwest, outbound URLs - On-chain entry points: For Solana programs, enumerate all instruction handlers, CPI calls, PDA derivations
- Environment variable consumption: Search for
process.env,std::env,os.environ,env::var
Output: Attack surface table: entry point, type, authentication required (yes/no/unknown), input validation present (yes/no/unknown).
Phase 2: Secrets Archaeology
Goal: Find every secret, credential, API key, and sensitive value — committed or not.
Scan targets:
- Current codebase: Search for high-entropy strings, Base64 blobs, hex strings > 32 chars
- Git history:
git log --all --diff-filter=A -- '*.env' '*.pem' '*.key' '*.secret' - Common patterns:
PRIVATE_KEY,SECRET_KEY,API_KEY,TOKEN,PASSWORD,CREDENTIALsk_live_,pk_live_,ghp_,gho_,github_pat_,xoxb-,xoxp------BEGIN (RSA |EC |OPENSSH )?PRIVATE KEY-----mongodb://,postgres://,mysql://,redis://with credentials- Solana keypair files:
[followed by 64 numbers (byte array format)
- Config files:
.env,.env.*,config.json,secrets.yaml,credentials.json - CI secrets: Check
.github/workflows/*.ymlfor hardcoded secrets vs${{ secrets.* }} - Docker: Check Dockerfiles for
ARG/ENVwith secrets, build args leaking to image layers - Git hooks: Check
.git/hooks/and.husky/for credential exposure
Severity ratings:
- CRITICAL: Live production secrets in code or git history
- HIGH: Test/dev secrets that match production naming patterns
- MEDIUM: Secrets in .env.example with real-looking values
- LOW: Overly broad .gitignore gaps (missing
*.pem,*.key)
Phase 3: Dependency Supply Chain
Goal: Audit every dependency for known vulnerabilities, typosquatting, and maintainer risk.
- Known vulnerabilities:
npm audit/pnpm audit/yarn audit(Node)cargo audit(Rust — install if missing)pip-audit(Python)govulncheck(Go)
- Typosquatting check: For each dependency, verify the package name is correct:
- Check for common letter swaps (
lodashvs1odash) - Check for scope confusion (
@solana/web3.jsvssolana-web3.js)
- Maintainer risk:
- Single-maintainer packages with > 1M weekly downloads
- Packages with recent ownership transfers
- Packages last published > 2 years ago
- Pinning audit:
- Check for
^or~ranges in production dependencies - Check for lockfile presence and freshness
- Check for
npm_config_ignore_scripts=trueor equivalent
- Post-install scripts: Search for packages with
preinstall,postinstall,preparescripts that execute arbitrary code - Solana-specific: Check
@coral-xyz/anchor,@solana/web3.js,@solana/spl-tokenversions against known-good versions
Output: Dependency risk table: package, version, vulnerability (CVE if applicable), risk level, recommendation.
Phase 4: CI/CD Pipeline Security
Goal: Ensure the build and deploy pipeline cannot be compromised.
- GitHub Actions:
- Search for
uses:entries not pinned to a full immutable commit SHA (for example,@<full commit SHA>, including 40- or 64-character SHAs) - Treat
@v*tags, branches, and other mutable refs as weaker references, not immutable pinning - Check for
pull_request_targettrigger (code injection risk) - Check for
${{ github.event.*.body }}or similar injection points - Verify secrets are not logged (
echo ${{ secrets.* }}) - Check for excessive
permissions:(should be minimal)
- Docker builds:
- Multi-stage builds (secrets not in final image)
- No
--build-argwith secrets - Base images pinned by digest
- No
latesttags in FROM
- Deploy pipeline:
- Verify deploy requires passing CI
- Check for manual approval gates on production
- Verify rollback capability exists
- Artifact security:
- Check if build artifacts are signed
- Verify SBOM generation if applicable
- Check for reproducible builds
Phase 5: Infrastructure Shadow Surface
Goal: Find infrastructure that exists but isn't in the main codebase.
- DNS and domains: Check for references to domains, subdomains, CDN endpoints
- Cloud resources: Search for AWS ARNs, GCP project IDs, Azure resource IDs
- Terraform/IaC: If present, check for drift indicators, unencrypted state
- Database migrations: Check migration files for security-relevant changes (adding auth columns, dropping constraints)
- Feature flags: Search for feature flag services (LaunchDarkly, Unleash, env-based flags) that might expose unauthenticated endpoints
- Solana-specific:
- Check for program upgrade authority settings
- Verify multisig requirements for program upgrades
- Check for open PDAs that anyone can write to
Phase 6: Webhook & Integration Audit
Goal: Verify all inbound webhooks validate authenticity and all outbound integrations are secure.
- Inbound webhooks:
- Search for webhook handler endpoints
- Verify signature validation (HMAC, asymmetric signature)
- Check for replay protection (timestamp validation, nonce)
- Verify IP allowlisting if applicable
- Outbound integrations:
- Check for TLS verification (
rejectUnauthorized: false,verify=False) - Verify timeout settings on outbound calls
- Check for circuit breaker patterns
- Third-party callbacks:
- OAuth callback URLs: verify state parameter validation
- Payment callbacks: verify signature and idempotency
- Solana: verify transaction confirmation before acting on webhooks
Phase 7: LLM & AI Security
Goal: Audit LLM integrations for prompt injection, data exfiltration, and trust boundary violations.
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 96 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/build/cso/SKILL.md
Popularity
- Repository stars
- 144
- Repository forks
- 40
- 7-day trend score
- 25
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/sendaifun/solana-new/cso)