Skip to content
cccskills
FreePublished on GitHub

code-security-review

代码安全审查时使用。适用于 PR 审查 / SAST 扫描 / 手动代码审计。融合 OWASP Code Review Guide + Semgrep + SonarQube。

The English summary is being prepared. Showing the original description.

See how to install

Files included (2)

  • SKILL.md2.5 KB
  • templates/security-review-checklist.md807 B

SKILL.md (original)

Review the instructions the agent will receive before you install.

代码安全审查(Code Security Review)

适用场景

  • PR 安全审查
  • SAST 工具扫描
  • 手动代码审计
  • 新依赖引入评估
  • 敏感操作审查

核心原则

1. 自动化 + 手动结合
   工具找已知模式,人找业务逻辑漏洞

2. 关注输入边界
   所有外部输入都不可信

3. 关注权限检查
   每个写操作都要校验权限

4. 关注敏感数据
   日志 / 响应 / 缓存中不能有密钥 / PII

SAST 工具

工具语言特点
Semgrep多语言自定义规则、快
SonarQube多语言全面、企业级
CodeQL多语言GitHub 原生、深度
Snyk Code多语言AI 辅助
BanditPythonPython 专用
ESLint SecurityJS/TS前端安全规则
SpotBugsJavaJava 安全
gosecGoGo 安全

审查清单(每次 PR)

输入校验:
  □ 所有外部输入有校验(类型 / 长度 / 格式)
  □ SQL 参数化(不拼接)
  □ HTML 转义(防 XSS)
  □ 路径不拼接用户输入(防路径穿越)
  □ URL 不直接用用户输入(防 SSRF)
  □ 正则不用用户输入(防 ReDoS)

认证鉴权:
  □ 写操作有认证
  □ 资源归属校验(不能改别人的)
  □ 角色权限校验
  □ 不暴露存在性

敏感数据:
  □ 不日志输出密钥 / Token / PII
  □ 不在响应中返回内部信息
  □ 密码用 bcrypt / argon2
  □ 敏感配置用环境变量

依赖:
  □ 新依赖已评估(Stars / 维护 / 安全历史)
  □ 版本锁定
  □ 无已知高危漏洞

配套模板

  • templates/security-review-checklist.md — PR 安全审查清单

质量自检

□ SAST 工具集成 CI
□ 手动审查关键路径
□ 输入校验完整
□ 权限检查完整
□ 敏感数据不泄露
□ 依赖安全
□ 发现问题有修复建议

常见坑

  1. 只跑工具不手动——漏业务逻辑
  2. 不审查权限——IDOR 最常见
  3. 日志输出 Token——泄露
  4. 新依赖不评估——引入恶意包
  5. SQL 拼接——注入

与其他 skill 的协作

上游:
  threat-modeling → 重点审查区域

下游:
  security-report → 发现纳入报告
  backend-engineer → 修复

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

A/B 测试设计与分析时使用。适用于产品实验、功能验证、转化率优化。融合假设驱动 + 样本量计算 + 置信度判断。

The English summary is being prepared. Showing the original description.

zhaoxuya520/AI-Fullstack-Delivery-Workflow54Updated May 19, 2026

上线前业务方/产品方验收时使用。适用于功能交付确认、UAT、发布会签。融合 BDD Given-When-Then、Specification by Example、ATDD。

The English summary is being prepared. Showing the original description.

zhaoxuya520/AI-Fullstack-Delivery-Workflow54Updated May 19, 2026

设计无障碍可访问的界面时使用。适用于满足 WCAG 标准、键盘导航、屏幕阅读器支持。优先使用 WCAG 2.2 AA 级标准 + 键盘 + 焦点 + 对比度 + ARIA。

The English summary is being prepared. Showing the original description.

zhaoxuya520/AI-Fullstack-Delivery-Workflow54Updated May 19, 2026

实现可访问性(无障碍)时使用。覆盖 WCAG 2.2 AA / ARIA / 键盘导航 / 屏幕阅读器 / 颜色对比 / 焦点管理。融合 React Aria / Radix UI / Headless UI 实践 + axe-core 自动化测试。

The English summary is being prepared. Showing the original description.

zhaoxuya520/AI-Fullstack-Delivery-Workflow54Updated May 19, 2026

AI 模型部署时使用。适用于推理服务 / GPU / TensorRT / 监控 / 扩缩容。

The English summary is being prepared. Showing the original description.

zhaoxuya520/AI-Fullstack-Delivery-Workflow54Updated May 19, 2026

数据分析报告输出时使用。适用于业务分析报告、周报、专项分析、决策支持。融合洞察 + 建议 + 行动项。

The English summary is being prepared. Showing the original description.

zhaoxuya520/AI-Fullstack-Delivery-Workflow54Updated May 19, 2026

See all skills by zhaoxuya520

Report a problem with this skill