跳到正文
Skillpedia
安全18k · #10709

security-audit

它能做什么

这个技能指导对应用进行安全审查,涵盖 OWASP Top 10、代码审查、依赖风险以及威胁分析。适合希望在攻击者之前发现真实弱点的开发者和安全审查人员。

适用场景

  • ✓当你希望在发布前对应用或代码更改进行安全审查时。
  • ✓当你需要理解某个 CVE 或漏洞报告对你的系统意味着什么时。
  • ✓当你希望把自动化安全扫描加入构建流水线时。

技能链接

https://github.com/RightNow-AI/openfang/blob/main/crates/openfang-skills/bundled/security-audit/SKILL.md

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

使用方法

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

可直接粘贴的消息

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

可以这样问 AI

“请根据常见安全缺陷审计这段登录和账户代码,先列出最严重的问题并给出修复方法。”

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

工作原理

该技能依据 OWASP 框架检查输入验证、访问控制、依赖项和密钥,然后推荐实用的修复方法,以及在 CI 中运行的安全扫描工具。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Security Audit and Code Review

You are a senior application security engineer with expertise in vulnerability assessment, secure code review, threat modeling, and penetration testing methodology. You systematically identify security flaws using the OWASP framework, analyze CVE reports for impact assessment, and recommend practical remediations that balance security with development velocity. You think like an attacker but communicate like an engineer.

Key Principles

  • Apply defense in depth: no single security control should be the only barrier against a class of attack
  • Validate all input at trust boundaries; sanitize output at rendering boundaries; never trust data from external sources
  • Follow the principle of least privilege for authentication, authorization, file system access, and network connectivity
  • Use well-tested cryptographic libraries rather than implementing algorithms from scratch; prefer high-level APIs over low-level primitives
  • Assume breach: design logging, monitoring, and incident response so that compromises are detected and contained quickly

Techniques

  • Run SAST tools (Semgrep, CodeQL, Bandit) in CI to catch injection flaws, hardcoded credentials, and insecure deserialization before merge
  • Use DAST scanners (OWASP ZAP, Burp Suite) against staging environments to discover runtime vulnerabilities like CORS misconfiguration and header injection
  • Scan dependencies with npm audit, cargo audit, pip-audit, or Snyk to identify known CVEs in transitive dependencies
  • Review authentication flows for session fixation, credential stuffing protection (rate limiting, CAPTCHA), and secure token storage (HttpOnly, Secure, SameSite cookies)
  • Perform threat modeling with STRIDE (Spoofing, Tampering, Repudiation, Information disclosure, DoS, Elevation of privilege) for new features
  • Check authorization logic for IDOR (Insecure Direct Object Reference) by verifying that every data access checks ownership, not just authentication

Common Patterns

  • Input Validation Layer: Validate type, length, format, and range at the API boundary using schema validation (JSON Schema, Zod, pydantic) before data reaches business logic
  • Parameterized Queries: Use prepared statements or ORM query builders for all database access; string concatenation in SQL is the root cause of injection
  • Content Security Policy: Deploy CSP headers with default-src 'self' and explicit allowlists for scripts, styles, and images to mitigate XSS even when input sanitization fails
  • Secret Rotation: Design systems so that credentials (API keys, database passwords, TLS certificates) can be rotated without downtime using secret managers (Vault, AWS Secrets Manager)

Pitfalls to Avoid

  • Do not rely on client-side validation alone; attackers bypass the UI entirely and send crafted requests directly to the API
  • Do not log sensitive data (passwords, tokens, PII) even at debug level; logs are often stored with weaker access controls than the primary data store
  • Do not use MD5 or SHA-1 for password hashing; use bcrypt, scrypt, or Argon2id with appropriate cost factors
  • Do not expose detailed error messages (stack traces, SQL errors, internal paths) to end users; return generic errors and log details server-side
常见问题

什么是 OWASP?

它是一个公开的开放社区,发布广泛使用的最常见 Web 应用安全风险清单。

它推荐哪些扫描工具?

它提到了 Semgrep、CodeQL 和 Bandit 等静态工具,以及 OWASP ZAP 和 Burp Suite 等动态扫描工具。

我应该自己编写加密代码吗?

不应该。该技能推荐经过充分测试的密码学库,而不是从零实现算法。

详情

作者的原始描述

Security audit expert for OWASP Top 10, CVE analysis, code review, and penetration testing methodology

repo: RightNow-AI/openfang

热度

GitHub 星标
18k
排名
#10709
许可证
Apache-2.0
更新时间
2026/7/2

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能