File contents 安全审查技能
关联 Agent: security-reviewer(安全审查主力)、code-reviewer(代码审查中的安全维度)
本技能确保所有代码遵循安全最佳实践,识别潜在漏洞。
快速参考
核心职责 : 确保代码遵循安全最佳实践,识别潜在漏洞
覆盖范围 : 密钥管理、输入验证、SQL 注入、认证授权、XSS/CSRF 防护、速率限制、敏感数据、依赖安全、命令注入、路径遍历
关键原则 : 安全不是可选项,有疑问时选择更安全的方案
触发条件
实现认证或授权
处理用户输入或文件上传
创建新的 API 端点
使用密钥或凭证
实现支付功能
存储或传输敏感数据
集成第三方 API
安全检查速查
类别
核心规则
检查项
密钥管理
环境变量,不硬编码
.env.local 在 .gitignore,Git 历史无密钥
输入验证
Schema 验证(zod/pydantic),白名单
文件上传限制(大小/类型/扩展名)
SQL 注入
参数化查询,不拼接 SQL
ORM 正确使用
认证授权
httpOnly cookies,RBAC
Token 不放 localStorage
XSS
DOMPurify 净化,CSP 头
无未验证的动态渲染
CSRF
CSRF Token,SameSite=Strict
状态变更操作有保护
速率限制
所有 API 有限制
昂贵操作更严格
敏感数据
日志脱敏,通用错误消息
堆栈跟踪不暴露
依赖
npm audit clean,Lock 已提交
启用 Dependabot
命令注入
execFile 非 exec,shell=False
不拼接用户输入
路径遍历
os.path.basename 过滤
不直接拼接路径
子文件索引
参考资源
记住 :安全不是可选项。一个漏洞可能危及整个平台。有疑问时,选择更安全的方案。
Converted and distributed by TomeVault — claim your Tome and manage your conversions.
1 --- 2 name: xiaobei930-cc-best-security 3 description: 安全审查技能 4 --- 5 6 # 安全审查技能 7 8 > 关联 Agent: `security-reviewer`(安全审查主力)、`code-reviewer`(代码审查中的安全维度) 9 10 本技能确保所有代码遵循安全最佳实践,识别潜在漏洞。 11 12 ## 快速参考 13 14 - **核心职责**: 确保代码遵循安全最佳实践,识别潜在漏洞 15 - **覆盖范围**: 密钥管理、输入验证、SQL 注入、认证授权、XSS/CSRF 防护、速率限制、敏感数据、依赖安全、命令注入、路径遍历 16 - **关键原则**: 安全不是可选项,有疑问时选择更安全的方案 17 18 ## 触发条件 19 20 - 实现认证或授权 21 - 处理用户输入或文件上传 22 - 创建新的 API 端点 23 - 使用密钥或凭证 24 - 实现支付功能 25 - 存储或传输敏感数据 26 - 集成第三方 API 27 28 ## 安全检查速查 29 30 | 类别 | 核心规则 | 检查项 | 31 | ------------ | ----------------------------------- | ------------------------------------------ | 32 | **密钥管理** | 环境变量,不硬编码 | `.env.local` 在 .gitignore,Git 历史无密钥 | 33 | **输入验证** | Schema 验证(zod/pydantic),白名单 | 文件上传限制(大小/类型/扩展名) | 34 | **SQL 注入** | 参数化查询,不拼接 SQL | ORM 正确使用 | 35 | **认证授权** | httpOnly cookies,RBAC | Token 不放 localStorage | 36 | **XSS** | DOMPurify 净化,CSP 头 | 无未验证的动态渲染 | 37 | **CSRF** | CSRF Token,SameSite=Strict | 状态变更操作有保护 | 38 | **速率限制** | 所有 API 有限制 | 昂贵操作更严格 | 39 | **敏感数据** | 日志脱敏,通用错误消息 | 堆栈跟踪不暴露 | 40 | **依赖** | npm audit clean,Lock 已提交 | 启用 Dependabot | 41 | **命令注入** | execFile 非 exec,shell=False | 不拼接用户输入 | 42 | **路径遍历** | os.path.basename 过滤 | 不直接拼接路径 | 43 44 ## 子文件索引 45 46 | 文件 | 内容 | 47 | -------------------------------------------- | ----------------------------------- | 48 | [owasp-patterns.md](./owasp-patterns.md) | OWASP Top 10 详细防护模式和代码示例 | 49 | [verify-checklist.md](./verify-checklist.md) | 安全测试示例 + 部署前安全检查清单 | 50 | [cloud-security.md](./cloud-security.md) | IAM、密钥管理、CI/CD、网络安全 | 51 | [config-audit.md](./config-audit.md) | 配置审计清单 | 52 53 ## 参考资源 54 55 - [OWASP Top 10](https://owasp.org/www-project-top-ten/) 56 - [Web 安全学院](https://portswigger.net/web-security) 57 58 --- 59 60 > **记住**:安全不是可选项。一个漏洞可能危及整个平台。有疑问时,选择更安全的方案。 61 62 --- 63 > Converted and distributed by [TomeVault](https://tomevault.io/claim/xiaobei930) — claim your Tome and manage your conversions. 64 <!-- tomevault:4.0:skill_md:2026-04-11 -->
tomevault-io/skills-registry/tree/main/xiaobei930--cc-best--security commit 6b7d2bf6aa
Frequently asked questions How do I install the Xiaobei930 Cc Best Security skill? Run npx skillmds@latest add tomevault-io/xiaobei930-cc-best-security in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
What does the Xiaobei930 Cc Best Security skill do? 安全审查技能 It is listed under Security on SkillMD.
Is Xiaobei930 Cc Best Security safe to use? This skill has not completed SkillMD's automated safety review yet. Independent scanners report: SkillSpector: PASS, Skill Scanner: PASS. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
Which AI agents work with Xiaobei930 Cc Best Security? This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Is Xiaobei930 Cc Best Security free to use? Yes. Installing skills from SkillMD is free, and the skill stays under its author's original license.
Who published Xiaobei930 Cc Best Security? tomevault-io (@tomevault-io) published this skill. Their other Agent Skills are listed on their SkillMD profile.