跳到正文
Skillpedia
安全33k · #8518

owasp-security

它能做什么

这个技能为 AI 智能体提供一份广泛使用的 OWASP 安全标准和常见弱点的参考,供检查之用。适合进行安全审阅、审计或安全功能开发的开发者。

适用场景

  • ✓当开发者想对网页应用、API 或移动应用进行安全审阅的时候。
  • ✓当正在构建身份验证、加密或访问控制,并且必须安全完成的时候。
  • ✓当 AI 或智能体系统需要检查提示词注入及类似风险的时候。

技能链接

https://github.com/davila7/claude-code-templates/blob/main/.claude-plugin/skills/owasp-security/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/davila7/claude-code-templates/blob/main/.claude-plugin/skills/owasp-security/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“请检查我的登录和访问控制代码,看看是否存在常见的 OWASP 安全问题。”

每周 5 个新技能,1 分钟读完。

工作原理

这个技能为智能体提供六项 OWASP 标准的指导,包括如何发现每种弱点以及如何修复。然后智能体把这些指导应用到你指定的代码上。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Comprehensive OWASP Security Skills

A developer-focused security reference covering six OWASP standards for securing web applications, APIs, mobile apps, containers, and AI/LLM systems. Each section provides concise detection guidance, key requirements, and mitigation strategies.

Quick Navigation

  1. OWASP Top 10 (2021)
  2. OWASP ASVS 5.0
  3. OWASP MASVS v2.1.0
  4. OWASP API Security Top 10
  5. OWASP Kubernetes Top 10
  6. OWASP Agentic Applications 2026

Section 1: OWASP Top 10 (2021)

The OWASP Top 10 represents the most critical security risks in web applications.

A01: Broken Access Control

Detection: URLs with direct ID references (/user/1234/orders); client-side only enforcement; missing authorization checks. Mitigation: Enforce server-side authorization for every sensitive operation; verify user ownership of resources; implement default-deny principle. Example:

// INSECURE: No authorization check
app.get('/users/:id/orders', (req, res) => {
  const orders = db.query('SELECT * FROM orders WHERE user_id = ?', req.params.id);
  res.json(orders);
});
// SECURE: Authorization check
app.get('/users/:id/orders', (req, res) => {
  if (req.user.id !== parseInt(req.params.id)) return res.status(403).json({error: 'Forbidden'});
  const orders = db.query('SELECT * FROM orders WHERE user_id = ?', req.params.id);
  res.json(orders);
});

Checklist: ☐ Authorization on server for all sensitive ops ☐ Default-deny policy ☐ No ID-based obscurity ☐ Whitelist allowed fields


A02: Cryptographic Failures

Detection: Sensitive data in plaintext; weak encryption (DES, ECB); missing TLS; hardcoded secrets in code. Mitigation: Always use HTTPS/TLS; encrypt data at rest with AES-256; store secrets in environment variables or vaults; mask sensitive logs. Example:

# INSECURE: API key in code
api_key = "sk-abc123xyz789"

# SECURE: From environment
import os
api_key = os.getenv("API_KEY")
if not api_key: raise ValueError("API_KEY not set")

Checklist: ☐ HTTPS enforced ☐ AES-256 encryption at rest ☐ No secrets in code ☐ Sensitive data masked in logs


A03: Injection (SQL, Command, NoSQL)

Detection: String concatenation in queries; exec, query, run with user input; no prepared statements. Mitigation: Use parameterized queries; whitelist input; avoid string concatenation; use safe APIs (subprocess.run with list args). Example:

# INSECURE: String concatenation
os.system("tar -czf " + filename + " /var/data")

# SECURE: List-based API
import subprocess
subprocess.run(["tar", "-czf", filename, "/var/data"], check=True)

Checklist: ☐ Parameterized queries only ☐ No string concat ☐ Whitelist input ☐ Safe subprocess calls


A04: Insecure Design

Detection: No threat modeling; missing security controls by design; no authentication/authorization from the start. Mitigation: Implement threat modeling early; design security in from the beginning; use established security libraries/patterns. Checklist: ☐ Threat modeling completed ☐ Security controls in design ☐ Auth/authz from start ☐ Security review in SDLC


A05: Security Misconfiguration

Detection: Debug mode enabled; default credentials; verbose error messages; missing security headers; exposed APIs. Mitigation: Disable debug mode; change defaults; hide version info; implement security headers (HSTS, CSP, X-Frame-Options). Example:

# INSECURE: Debug enabled in production
app.debug = True

# SECURE: Debug disabled
app.debug = False
app.config['HSTS_MAX_AGE'] = 31536000

Checklist: ☐ Debug disabled ☐ Defaults changed ☐ Security headers set ☐ No version disclosure


A06: Vulnerable & Outdated Components

Detection: Old versions in package.json/requirements.txt; unpatched frameworks; deprecated libraries. Mitigation: Regularly audit dependencies with npm audit, pip safety, Snyk; remove unused packages; keep frameworks patched. Checklist: ☐ Dependency audits regular ☐ No outdated versions ☐ Unused deps removed ☐ CI/CD security scanning


A07: Authentication Failures

Detection: Weak passwords; no MFA; predictable

常见问题

它涵盖哪些标准?

它涵盖 OWASP Top 10、ASVS、MASVS、API Security Top 10、Kubernetes Top 10 以及智能体应用指南。

它能保证应用安全吗?

不能。它是发现和修复常见问题的参考,不能替代专业审计。

它能帮助处理 AI 系统吗?

可以。它包含关于提示词注入以及 LLM 和智能体系统风险的指导。

详情

作者的原始描述

Comprehensive 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".

repo: davila7/claude-code-templates

热度

GitHub 星标
33k
排名
#8518
许可证
MIT
更新时间
2026/11/2

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能