security-hardening
Skill2 starsChanged 52 days agoMITView on GitHub
Web application security hardening for OWASP Top 10 vulnerabilities. Use when implementing authentication, HTTP security headers, CORS, rate limiting, input validation, or reviewing code for XSS, SQL injection, CSRF, or SSRF. Covers CSP, HSTS, session cookies, bcrypt, Zod validation, and secrets management.
- Reads credentials
25 other projects use a version of this.
Adopted by
Most recently taken up by
- valentinesamuel/claude-skillstheir own version, first seen Nov 8, 2026
- Mehul72/skillstheir own version, first seen Nov 8, 2026
- looties-io/looties-skillstheir own version, first seen Nov 1, 2026
- Kin9Zeus/senior-engineer-skillstheir own version, first seen Nov 1, 2026
- DevelopersGlobal/ai-agent-skillstheir own version, first seen Oct 25, 2026
- juanitourquiza/shipframetheir own version, first seen Oct 23, 2026
Used with
Projects with it also use incident-response, observability and 9 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
AnthropicSkillincident-response
Run an incident response workflow — triage, communicate, and write postmortem. Trigger with "we have an incident", "production is down", an alert that needs severity assessment, a status update mid-incident, or when writing a blameless postmortem after resolution.
Also in 5 projects that use this
OpenAISkillobservability
Vercel Observability expert guidance — Drains (logs, traces, speed insights, web analytics), Web Analytics, Speed Insights, runtime logs, custom events, OpenTelemetry integration, and monitoring dashboards. Use when instrumenting, debugging, or optimizing application performance and user experience on Vercel.
Also in 4 projects that use this
barisariburnuSkillperformance-optimization
Complete performance optimization guide for Next.js applications including frontend, backend, database, caching, and general optimization strategies. Use when improving performance, reducing bundle size, optimizing queries, or implementing caching.
Also in 4 projects that use this
GitHubSkillaccessibility-audit
Audits actual components and routes against applicable WCAG 2.2 A/AA criteria using consumer-owned design-system evidence and repository tools. Use when asked for an accessibility audit, a11y check, keyboard or focus review, contrast check, or screen-reader verification.
Also in 3 projects that use this
MicrosoftSkillapi-design
Guide for designing and documenting RESTful APIs. Use when asked to design an API, create endpoints, or document an API.
Also in 5 projects that use this
shanggqmSkilldata-analysis
数据分析技能,提供结构化的数据查询、统计分析和报告生成工作流。当用户需要查询数据库、进行数据统计分析、生成分析报告时使用。按规范输出原始数据、计算结果、Markdown报告和HTML可视化报告。
Also in 3 projects that use this
Other versions25 projects use a version of this.
Word for word · 1
- revealui-studio/revskills★ 2100% same
Edited · 0
None found.
Wrote their own version · 24
- duyet/clickhouse-monitoring★ 303same name
- DevelopersGlobal/ai-agent-skills★ 216same name
- swyxio/skills★ 194same name
- mn-youssef/security-skills★ 47same name
- wulaosiji/skills★ 28same name
- khuynh22/agent-dev-team★ 9same name
- alexderz/agentic-toolbox★ 5same name
- juanitourquiza/shipframe★ 4same name
- jx1100370217/my-openclaw-skills★ 4same name
- thejordanleopold/claude-code-skills-distilled★ 4same name
14 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository29 other files it gives its agents.
- skills/revealui-design/CLAUDE.mdCLAUDE.md
- drizzle-dbSkill
- electric-syncSkill
- exhaustive-auditSkill
- grok-bot-checkpointSkill
- knowledge-graphSkill
- mcp-serverSkill
- multi-agent-memorySkill
- next-best-practicesSkill
- redundancy-scanSkill
- revealui-checkpointSkill
- revealui-cleanupSkill
- coordinateSkill
- revealui-designSkill
- revealui-design-statusSkill
- revealui-doctorSkill
- revealui-opsSkill
- revealui-pickupSkill
- revealui-recoverSkill
- revealui-rollupSkill
- revealui-skills-testSkill
- revealui-snapshotSkill
- revealui-sync-ltsSkill
- revealui-sync-rulesSkill
- revealui-trackerSkill
- revvault-resolveSkill
- tailwind-v4Skill
- vitest-testingSkill
- yjs-collaborationSkill
The file
We split this skill into the rules it gives an agent
9 rules. 0 are common, 4 are distinctive, and 5 are very specific to this project.
0
Common
Most of the 21 edited versions we read keep these.
4
Distinctive
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Very specific: line 39
Never use origin: '*' with credentials: true
- Very specific: line 86
Use Zod schemas — never trust typeof or manual checks
- Very specific: line 104
Never use dangerouslySetInnerHTML without sanitization
- Distinctive: line 106
Use CSP to prevent inline script execution
- Distinctive: line 122
Use parameterized queries (Drizzle ORM does this automatically)
- Distinctive: line 123
Never concatenate user input into SQL strings
- Very specific: line 124
Use sql.placeholder() for dynamic queries
- Very specific: line 136
Never commit .env files, API keys, or credentials
- Distinctive: line 137
Prefer a single encrypted vault (or platform secret store) as source of truth.
“Common” is measured: kept by at least 6 in 10 of the 21 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Security Hardening Patterns
HTTP Security Headers
const securityHeaders = {
'Content-Security-Policy': "default-src 'self'; script-src 'self'; style-src 'self' 'unsafe-inline'; img-src 'self' data: https:; font-src 'self'; connect-src 'self'; frame-ancestors 'none'",
'X-Content-Type-Options': 'nosniff',
'X-Frame-Options': 'DENY',
'X-XSS-Protection': '0', // Disabled — CSP is the modern replacement
'Referrer-Policy': 'strict-origin-when-cross-origin',
'Permissions-Policy': 'camera=(), microphone=(), geolocation=()',
'Strict-Transport-Security': 'max-age=63072000; includeSubDomains; preload',
};CORS
const corsOptions = {
origin: ['https://app.example.com'], // Never use '*' with credentials
methods: ['GET', 'POST', 'PUT', 'DELETE'],
credentials: true,
maxAge: 86400,
};- Never use
origin: '*'withcredentials: true - Whitelist specific origins, never reflect the Origin header
- Set
maxAgeto reduce preflight requests
Authentication (Session-Based)
// Session cookie settings
const sessionCookie = {
httpOnly: true, // No JavaScript access
secure: true, // HTTPS only
sameSite: 'lax', // CSRF protection
maxAge: 86400, // 24 hours
path: '/',
};
// Password hashing (bcrypt, 12+ rounds)
import { hash, compare } from 'bcrypt';
const ROUNDS = 12;
const hashed = await hash(password, ROUNDS);
const valid = await compare(input, hashed);- Session-only auth (no JWT in cookies — JWTs can't be revoked)
- bcrypt with 12+ rounds (not MD5, SHA-256, or plain text)
- httpOnly cookies prevent XSS token theft
- sameSite=lax prevents CSRF on state-changing requests
Input Validation
import { z } from 'zod';
const CreateUserSchema = z.object({
email: z.string().email().max(255),
name: z.string().min(1).max(100),
role: z.enum(['admin', 'user']),
});
// Validate at system boundaries
export async function createUser(input: unknown) {
const data = CreateUserSchema.parse(input); // throws on invalid
// ... safe to use data
}- Validate ALL external input (user input, API requests, webhooks)
- Use Zod schemas — never trust
typeofor manual checks - Validate at system boundaries, trust internal code
- Set reasonable max lengths to prevent abuse
Rate Limiting
// Per-endpoint rate limiting
const rateLimiter = {
'/api/auth/sign-in': { windowMs: 15 * 60 * 1000, max: 10 }, // 10 per 15 min
'/api/auth/sign-up': { windowMs: 60 * 60 * 1000, max: 5 }, // 5 per hour
'/api/webhooks': { windowMs: 60 * 1000, max: 100 }, // 100 per minute
'/api/*': { windowMs: 60 * 1000, max: 300 }, // 300 per minute (default)
};XSS Prevention
- Never use
dangerouslySetInnerHTMLwithout sanitization - Validate URLs: block
javascript:,vbscript:,data:schemes - Use CSP to prevent inline script execution
- Escape user content in HTML attributes
function isSafeUrl(url: string): boolean {
try {
const parsed = new URL(url);
return ['http:', 'https:', 'mailto:'].includes(parsed.protocol);
} catch {
return false;
}
}SQL Injection Prevention
- Use parameterized queries (Drizzle ORM does this automatically)
- Never concatenate user input into SQL strings
- Use
sql.placeholder()for dynamic queries
// Safe (parameterized)
const users = await db.select().from(usersTable).where(eq(usersTable.email, userInput));
// DANGEROUS — never do this
const users = await db.execute(`SELECT * FROM users WHERE email = '${userInput}'`);Secrets Management
- Never commit
.envfiles, API keys, or credentials - Prefer a single encrypted vault (or platform secret store) as source of truth; inject at runtime
- RevealUI Studio / RevealFleet: secrets live in revvault (
revvault run --env KEY=path -- cmd/with-secrets). Env vars are a downstream injection surface, not the store. See fleetsecretshardline. Lookup and inject: revvault-resolve. - Generic apps: environment variables or managed secret stores; never hardcode
- Rotate credentials after any suspected exposure
- Scan for secrets in CI (Gitleaks, GitHub Secret Scanning)
OWASP Top 10 Checklist
- Broken Access Control — enforce on every endpoint, not just UI
- Cryptographic Failures — bcrypt for passwords, TLS everywhere
- Injection — parameterized queries, input validation
- Insecure Design — threat model before coding
- Security Misconfiguration — security headers, disable debug in prod
- Vulnerable Components — audit dependencies, pin versions
- Authentication Failures — rate limit, brute force protection
- Data Integrity Failures — verify webhook signatures, validate JWTs
- Logging Failures — log auth events, don't log secrets
- SSRF — validate URLs, block internal networks
Skill by RevealUI Studio — the agentic business runtime.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

