/unicorn-team:securityfrom unicorn-team
Guides secure development with defense-in-depth, covering authentication, authorization, input validation, secrets management, and OWASP Top 10 vulnerabilities.
Ships in unicorn-team. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Defense in Depth + Least Privilege. Layer multiple controls. Grant minimum permissions. Assume every layer can fail.
| # | Vulnerability | Key Defense |
|---|---|---|
| 1 | Broken Access Control | Auth check per resource, deny by default |
| 2 | Cryptographic Failures | Argon2/bcrypt, never MD5/SHA1 for passwords |
| 3 | Injection (SQL, XSS, Command) | Parameterized queries, escaping, allowlists |
| 4 | Insecure Design | Rate limiting, STRIDE threat modeling |
| 5 | Security Misconfiguration | Debug off in prod, generic error messages |
| 6 | Vulnerable Components | safety check / npm audit |
| 7 | Authentication Failures | Secure cookies, crypto-random session IDs |
| 8 | Data Integrity Failures | JSON with validation, never pickle |
| 9 | Logging Failures | Log security events, failed auth, admin actions |
| 10 | SSRF | URL allowlist, block internal IPs |
See references/owasp-top-10.md for detailed bad/good code examples per vulnerability.
Allowlist over Denylist:
# BAD: Denylist (easy to bypass)
if username in ['admin', 'root']:
raise ValueError()
# GOOD: Allowlist (explicit)
if not re.match(r'^[a-zA-Z0-9_]{3,20}$', username):
raise ValueError("Invalid format")
Layered Validation:
from pydantic import BaseModel, validator, constr
class UserInput(BaseModel):
username: constr(min_length=3, max_length=20, regex=r'^[a-zA-Z0-9_]+$')
email: str
age: int
@validator('email')
def validate_email(cls, v):
if not re.match(r'^[\w\.-]+@[\w\.-]+\.\w+$', v):
raise ValueError('Invalid email')
return v.lower()
@validator('age')
def validate_age(cls, v):
if not (0 <= v <= 150):
raise ValueError('Age 0-150')
return v
Context-Aware:
from markupsafe import escape
from urllib.parse import quote
html = f"<div>{escape(username)}</div>" # HTML context
url = f"https://example.com/search?q={quote(term)}" # URL context
js = f"var name = {json.dumps(username)};" # JS context
db.execute("SELECT * FROM users WHERE name = ?", [username]) # SQL: parameterize
# BAD: Hardcoded
API_KEY = "sk_live_abc123"
# GOOD: Environment with verification
import os
for secret in ['API_KEY', 'DATABASE_URL', 'SECRET_KEY']:
if secret not in os.environ:
raise RuntimeError(f"Missing: {secret}")
# .env (add to .gitignore, NEVER commit)
API_KEY=sk_live_abc123
# .env.example (commit this)
API_KEY=your_api_key_here
Production: Use AWS Secrets Manager, HashiCorp Vault, or platform-native secret stores.
from pathlib import Path
BASE_DIR = Path('/var/data')
file_path = (BASE_DIR / filename).resolve()
if not file_path.is_relative_to(BASE_DIR):
abort(403)
# BAD: user.update(**request.json) # Attack: {"is_admin": true}
ALLOWED = ['name', 'email', 'bio']
for field in ALLOWED:
if field in request.json:
setattr(user, field, request.json[field])
from flask_wtf.csrf import CSRFProtect
csrf = CSRFProtect(app)
app.config['SESSION_COOKIE_SAMESITE'] = 'Strict'
bandit -r src/ -f json -o report.json # Static analysis
safety check # Python dependency scan
npm audit # Node dependency scan
trivy image myapp:latest # Container scan
See references/security-tooling.md for pre-commit hooks, security headers config, and CI/CD integration.
Auth:
Input/Output:
Secrets & Crypto:
secrets module for random tokensMonitoring:
Config:
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
security-review, owasp, input-validation, authentication, authorization
npx claudepluginhub aj-geddes/unicorn-team --plugin unicorn-team15 skills in this plugin
/code-readingStrategic code comprehension protocol for navigating existing codebases. ALWAYS trigger on "understand this code", "how does this work", "refactor", "before changing", "legacy code", "code review", "what does this do", "explain this codebase", "walk me through", "unfamiliar code", "read through". Use when exploring unfamiliar code, preparing to modify legacy systems, debugging complex issues, or conducting code reviews. Different from pattern-transfer which maps known solutions across domains -- this skill builds accurate mental models of existing code./domain-devopsGuides the user through containerization, CI/CD pipelines, Kubernetes deployments, observability, and infrastructure management. ALWAYS trigger on "dockerize", "CI/CD", "kubernetes", "deploy", "monitoring", "logging", "metrics", "helm", "infrastructure", "observability", "rollback", "scaling", "pipeline", "container", "k8s", "GitOps", "Dockerfile", "health check", "troubleshoot deployment". Use when containerizing applications, building pipelines, deploying services, setting up monitoring, or debugging infrastructure issues. Different from the DevOps agent (agents/devops.md) which handles orchestration and runbook execution rather than pattern guidance./estimationGuides the user through risk-based task estimation using decomposition, three-point estimates, and PERT formula. ALWAYS trigger on "estimate", "how long will this take", "time to complete", "sizing", "scope this", "effort estimate", "how many hours", "story points", "project timeline", "when will this be done", "cost estimate", "level of effort". Use when sizing any work item, feature, or project./goGuides Go development with idiomatic patterns, tooling, and project structure. ALWAYS trigger on "go project", "go module", "go mod", "goroutine", "channel", "go test", "go build", "golangci-lint", "go interface", "go error handling", "go concurrency", "go struct", "go anti-pattern", "go best practices", "go tooling", "go lint". Use when setting up Go projects, writing idiomatic Go, choosing concurrency patterns, or configuring tooling. Different from testing skill which covers general test strategy; this covers Go-specific testing patterns and tooling configs./hvs-skill-buddyHVS Skill Buddy is the meta-skill for the entire HVS skill ecosystem. It keeps skills current with the latest Anthropic patterns, audits the skill library for drift and inconsistency, and creates new skills that fit the HVS system standard. ALWAYS trigger when the user mentions "skill buddy", "audit my skills", "skill drift", "create a new skill", "build a skill", "update my skills", "skill system", "are my skills consistent", "hvs skill", "skill conflicts", "skill overlap", "new skill for", or any request to inspect, improve, create, or manage skills in the HVS library. Also trigger when someone asks Claude to "make a skill like my other ones" or "keep this consistent with my existing skills."/javascriptGuides JavaScript and TypeScript development with modern tooling and patterns. ALWAYS trigger on "typescript", "javascript", "tsconfig", "eslint", "prettier", "vitest", "jest", "react", "node.js", "express", "npm", "package.json", "type error", "ts error", "js project setup", "frontend testing", "react hooks", "discriminated union", "type guard". Use when configuring TS/JS tooling, writing tests, structuring React or Node apps, or debugging type issues. Different from testing skill which covers general strategy; this covers JS/TS-specific test patterns and framework configs.Other plugins' skills for the same job