安全代码审查
performing-security-code-review
本技能使 Claude 能够使用 security-agent 插件开展以安全为重点的代码审查。它分析代码中的潜在漏洞,如 SQL 注入、XSS、身份验证缺陷和不安全的依赖项。Claude 使用此技能时...
- License 许可
- MIT
- 最近更新
- 2025-12-18
- Stars
- ★ 29
- Forks
- 9
01 前言 Front Matter
- name
- performing-security-code-review
- license
- MIT
- description
- This skill enables claude to conduct a security-focused code review using the security-agent plugin. it analyzes code for potential vulnerabilities like sql injection, xss, authentication flaws, and insecure dependencies. claude uses this skill wh...
- allowed-tools
- [ "Read", "Write", "Edit", "Grep", "Glob", "Bash" ]
02 资源文件 9
- 脚本assets/example_code_secure.py7.0 KB
- 脚本assets/example_code_vulnerable.py6.1 KB
- 资产文件assets/README.md424 B
- 资产文件assets/report_template.md5.2 KB
- 参考文档references/README.md410 B
- 脚本scripts/code_analyzer.py4.8 KB
- 脚本scripts/README.md448 B
- 参考文档SOURCE.md198 B
- 参考文档TRUST.auto.yaml2.2 KB
03 SKILL.md 正文
Overview
This skill empowers Claude to act as a security expert, identifying and explaining potential vulnerabilities within code. It leverages the security-agent plugin to provide detailed security analysis, helping developers improve the security posture of their applications.
How It Works
- Receiving Request: Claude identifies a user's request for a security review or audit of code.
- Activating Security Agent: Claude invokes the security-agent plugin to analyze the provided code.
- Generating Security Report: The security-agent produces a structured report detailing identified vulnerabilities, their severity, affected code locations, and recommended remediation steps.
When to Use This Skill
This skill activates when you need to:
- Review code for security vulnerabilities.
- Perform a security audit of a codebase.
- Identify potential security risks in a software application.
Examples
Example 1: Identifying SQL Injection Vulnerability
User request: "Please review this database query code for SQL injection vulnerabilities."
The skill will:
- Activate the security-agent plugin to analyze the database query code.
- Generate a report identifying potential SQL injection vulnerabilities, including the vulnerable code snippet, its severity, and suggested remediation, such as using parameterized queries.
Example 2: Checking for Insecure Dependencies
User request: "Can you check this project's dependencies for known security vulnerabilities?"
The skill will:
- Utilize the security-agent plugin to scan the project's dependencies against known vulnerability databases.
- Produce a report listing any vulnerable dependencies, their Common Vulnerabilities and Exposures (CVE) identifiers, and recommendations for updating to secure versions.
Best Practices
- Specificity: Provide the exact code or project you want reviewed.
- Context: Clearly state the security concerns you have regarding the code.
- Iteration: Use the findings to address vulnerabilities and request further reviews.
Integration
This skill integrates with Claude's code understanding capabilities and leverages the security-agent plugin to provide specialized security analysis. It can be used in conjunction with other code analysis tools to provide a comprehensive assessment of code quality and security.
04 同仓库更多 Skills
UI 视觉回归测试
testing-visual-regression
使用截图比较检测 UI 组件中的视觉变化。 在检测意外的 UI 更改或像素差异时使用。 用“测试视觉变化”、“比较截图”或“检测 UI 回归”等短语触发。
单元测试自动生成
generating-unit-tests
从源代码自动生成全面的单元测试,覆盖正常路径、边界条件和错误情况。 在为函数、类或模块创建测试覆盖时使用。 用“生成单元测试”、“为…创建测试”或“添加测试覆盖”等短语触发。
测试报告生成与可视化
generating-test-reports
生成包含指标、覆盖率和可视化内容的全面测试报告。 在执行专项测试时使用。 用“生成测试报告”、“创建测试文档”或“显示测试指标”等短语触发。
测试执行编排与协调
orchestrating-test-execution
协调跨多个环境和框架的并行测试执行。 在执行专项测试时使用。 用“编排测试”、“运行并行测试”或“协调测试执行”等短语触发。
managing-test-environments
Provision and manage isolated test environments with configuration and data. Use when performing specialized testing. Trigger with phrases like "manage test environment", "provision test env", or "setup test infrastructure".
generating-test-doubles
Generate mocks, stubs, spies, and fakes for dependency isolation. Use when creating mocks, stubs, or test isolation fixtures. Trigger with phrases like "generate mocks", "create test doubles", or "setup stubs".