davila7/claude-code-templates / .claude-plugin/skills/owasp-security
owasp-security
UnverifiedComprehensive OWASP-aligned security guidance across six standards - Top 10 (2021) for web apps, ASVS 5.0, MASVS v2.1.0 for mobile, API Security Top 10 (2023), Kubernetes Top 10 (2022), and the Agentic Applications 2026 edition for AI/LLM. Use for security reviews, vulnerability audits, secure auth/crypto/access-control implementation, Kubernetes manifest hardening, and LLM/agent prompt-injection defense - including indirect requests like "is this login flow secure?", "review this endpoint", or "audit my pod spec".
| File | Kind | Size |
|---|---|---|
| README.md | markdown | 8.5 KB |
| SKILL.md | skill md | 29.2 KB |
| examples/api-auth-bypass.js | script | 3.0 KB |
| examples/broken-access-control.py | script | 7.0 KB |
| examples/cryptographic-failures.js | script | 7.5 KB |
| examples/injection.js | script | 2.0 KB |
| examples/k8s-rbac.yaml | config | 4.5 KB |
| examples/logging-monitoring-failures.py | script | 14.2 KB |
| examples/prompt-injection.txt | markdown | 9.9 KB |
| examples/security-misconfiguration.py | script | 12.0 KB |
| examples/xss.html | other | 4.3 KB |
| owasp-css-instructions.md | markdown | 4.2 KB |
| skill.json | config | 11.9 KB |
examples/injection.js
View on GitHub// SQL Injection Example
// For detailed guidance, see: SKILL.md#section-1-owasp-top-10-2021
//
// This example demonstrates SQL injection via unsafe string concatenation.
// The 'id' parameter is directly concatenated into the SQL query without
// parameterization, allowing attackers to inject malicious SQL code.
const express = require('express');
const app = express();
// ===== VULNERABLE: String Concatenation =====
app.get('/user/unsafe', (req, res) => {
// VULNERABLE: String concatenation with user input
const q = "SELECT * FROM users WHERE id = " + req.query.id;
db.query(q, (err, rows) => {
if (err) {
res.status(500).json({ error: "Database error" });
return;
}
res.json(rows);
});
});
// ===== SECURE: Parameterized Queries =====
app.get('/user/safe', (req, res) => {
// SECURE: Use parameterized queries (prepared statements)
const q = "SELECT * FROM users WHERE id = ?";
const params = [req.query.id];
db.query(q, params, (err, rows) => {
if (err) {
res.status(500).json({ error: "Database error" });
return;
}
if (rows.length === 0) {
res.status(404).json({ error: "User not found" });
return;
}
res.json(rows);
});
});
// ===== SECURE: Input Validation + Parameterized Query =====
app.get('/user/safest', (req, res) => {
const userId = req.query.id;
// Use strict numeric validation: ensure userId contains only digits
if (!userId || !/^\d+$/.test(userId) || parseInt(userId) <= 0 || !Number.isSafeInteger(parseInt(userId))) {
res.status(400).json({ error: "Invalid user ID" });
return;
}
const q = "SELECT id, name, email FROM users WHERE id = ?";
const params = [parseInt(userId)];
db.query(q, params, (err, rows) => {
if (err) {
console.error("DB Error:", err);
res.status(500).json({ error: "Internal server error" });
return;
}
if (rows.length === 0) {
res.status(404).json({ error: "User not found" });
return;
}
res.json(rows[0]);
});
});
app.listen(3000);
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| rea-analysis-optimizationmorluto/reaOptimize REA providers and shared analysis workflows for agent context, latency, CPU, and memory while preserving correctness and Evidence. Use for analysis bottlenecks and cache or query design; CI/test-suite optimization belongs to rea-ci-tests-audit. | Stars: 469k | Updated | Claude CodeCodex | Verified | Install |
| rea-ci-tests-auditmorluto/reaAudit REA CI and test suites for correctness, fixture drift, false passes, and measured performance; use for suite or workflow investigations and efficiency changes, rather than ordinary feature testing or a single test failure. | Stars: 469k | Updated | Claude CodeCodex | Verified | Install |
| rea-tool-designmorluto/reaAudit, investigate, design, or change REA investigation tools, CLI/MCP contracts, provider capabilities, and Evidence semantics. | Stars: 469k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-auditDietrichGebert/ponytailQuality audit of the whole repo: bugs, security, real load, missing tests, speed, and what to delete. Most important first. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |