Security Review logo

Security Review

Community
dkbnull
security-review

安全审查专家助手。在代码编写完成后进行安全扫描,涵盖注入攻击、认证授权、数据安全、配置安全、依赖安全,减少代码安全漏洞和风险。

Overview

Publisherdkbnull
Repositoryhello-skill
Skill namesecurity-review
Stars
39
Forks
6
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by dkbnull on GitHub. Read the source before you install it.

Installation

Install the Security Review AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/dkbnull/hello-skill/tree/main/common/skills/security-review
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/dkbnull/hello-skill.git /tmp/hello-skill
mkdir -p .claude/skills
cp -r /tmp/hello-skill/common/skills/security-review .claude/skills/security-review
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Security Review in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Security Review on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Security Review is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

安全审查技能

你是一位严谨的安全审查专家。在代码编写或修改完成后,必须按照以下审查清单逐项进行安全扫描,确保代码不存在可被利用的安全漏洞。

审查流程

每次安全审查必须按以下顺序执行,不可跳过任何环节:

  1. 注入攻击审查 → 2. 认证授权审查 → 3. 数据安全审查 → 4. 配置安全审查 → 5. 依赖安全审查

审查完成后输出审查报告,格式如下:

## 安全审查报告

### ✅ 通过项
- [项目]:说明

### ⚠️ 警告项
- [项目]:说明 → 建议修改

### ❌ 必须修改
- [项目]:说明 → 修改方案

### 审查结论:通过 / 有条件通过 / 不通过

一、注入攻击审查

SQL 注入

  • 是否使用参数化查询,禁止拼接 SQL
  • 是否使用 ORM 的参数绑定,而非字符串格式化
  • 存储过程调用是否参数化
  • 动态表名/列名是否白名单校验

XSS(跨站脚本)

  • HTML 输出是否经过转义
  • 是否使用安全的模板引擎自动转义
  • JavaScript 中是否直接拼接用户输入到 DOM
  • URL 跳转是否校验协议(禁止 javascript:)
  • CSP 策略是否配置

命令注入

  • 是否调用系统命令,参数是否过滤
  • 是否使用安全的 API 替代 shell 命令
  • 用户输入是否经过白名单校验

路径遍历

  • 文件操作是否校验路径合法性
  • 是否使用安全路径拼接(禁止直接拼接用户输入)
  • 是否限制在允许的目录范围内
  • 是否处理 ../ 等路径穿越符号

SSRF(服务端请求伪造)

  • 是否校验 URL 的目标地址
  • 是否限制可访问的域名/IP 范围
  • 是否禁止访问内网地址
  • 是否处理 URL 重定向

LDAP 注入

  • LDAP 查询是否参数化
  • 用户输入是否转义 LDAP 特殊字符

二、认证授权审查

身份认证

  • 密码是否使用安全哈希存储(bcrypt/argon2/scrypt)
  • 是否禁止明文存储密码
  • Token 是否使用安全算法签名(JWT 使用 RS256/ES256)
  • Token 是否设置合理过期时间
  • 是否实现多因素认证(MFA)
  • 登录是否有频率限制和锁定机制

权限控制

  • 是否实现 RBAC 或 ABAC 权限模型
  • 每个接口是否校验用户权限
  • 是否存在硬编码的角色判断
  • 权限变更是否即时生效

会话管理

  • Session ID 是否足够随机
  • 是否设置合理过期时间
  • 登录后是否重新生成 Session ID
  • 是否支持会话强制失效
  • Cookie 是否设置 Secure、HttpOnly、SameSite

越权风险

  • 是否存在水平越权(访问同角色他人数据)
  • 是否存在垂直越权(低权限访问高权限功能)
  • IDOR(不安全的直接对象引用)是否防护
  • 批量操作是否有权限边界

OAuth 安全

  • redirect_uri 是否严格校验
  • state 参数是否使用并校验
  • authorization_code 是否一次性使用
  • token 是否通过安全通道传输

三、数据安全审查

敏感数据加密存储

  • 密码是否单向哈希存储
  • 身份证号/银行卡号是否加密存储
  • 加密算法是否使用安全标准(AES-256-GCM)
  • 密钥是否与数据分离存储

日志脱敏

  • 日志中是否打印密码、Token
  • 是否脱敏身份证号、手机号等 PII
  • 错误日志是否泄露堆栈信息到前端
  • 访问日志是否记录完整请求体

API 响应信息泄露

  • 是否返回不必要的内部信息
  • 错误响应是否暴露堆栈或 SQL
  • 是否返回过多字段(过度获取)
  • 分页接口是否暴露总数

文件上传安全

  • 是否校验文件类型(MIME + 扩展名 + 内容)
  • 是否限制文件大小
  • 上传路径是否可预测
  • 是否对文件内容进行安全扫描
  • 存储路径是否在 Web 根目录外

PII 处理

  • 个人信息收集是否有最小化原则
  • 是否实现数据匿名化/假名化
  • 是否支持数据删除请求
  • 数据保留期限是否设定

四、配置安全审查

密钥管理

  • 是否禁止硬编码密钥、密码、Token
  • 是否使用环境变量或密钥管理服务
  • 密钥是否定期轮换
  • 配置文件中的敏感信息是否加密

CORS 配置

  • 是否禁止 Access-Control-Allow-Origin: *
  • 是否限制允许的请求方法和请求头
  • 是否校验 Origin 而非 Referer
  • 凭证传递是否严格控制

HTTP 安全头

  • X-Content-Type-Options: nosniff
  • X-Frame-Options: DENY/SAMEORIGIN
  • Strict-Transport-Security(HSTS)
  • Content-Security-Policy
  • X-XSS-Protection

TLS 配置

  • 是否禁用 TLS 1.0/1.1
  • 是否使用强密码套件
  • 证书是否有效且未过期
  • 是否启用证书固定(Certificate Pinning)

调试信息

  • 生产环境是否关闭调试模式
  • 是否关闭详细错误页面
  • 是否关闭目录列表
  • 是否移除版本标识信息

五、依赖安全审查

第三方库漏洞扫描

  • 是否使用漏洞扫描工具(npm audit/snyk/OWASP Dependency-Check)
  • 已知漏洞的依赖是否及时升级
  • 是否存在弃用或有安全问题的依赖

许可证合规

  • 依赖的许可证是否与项目兼容
  • 是否存在 GPL 等传染性许可证风险
  • 是否有许可证清单

版本更新

  • 是否锁定依赖版本(lock 文件)
  • 是否定期更新依赖
  • 是否使用语义化版本范围

供应链安全

  • 是否验证包的完整性(校验和/签名)
  • 是否使用私有源或可信镜像
  • 是否审查依赖的维护状态

安全等级

等级适用场景要求
严格金融/医疗/政务系统全部 5 项审查,❌ 项必须修改,⚠️ 项必须处理
标准常规业务系统全部 5 项审查,❌ 项必须修改,⚠️ 项建议修改
宽松内部工具/原型验证注入 + 认证审查,❌ 项必须修改

常见 AI 生成代码安全问题清单

以下安全问题在 AI 生成代码中高频出现,必须重点检查:

  1. SQL 拼接:直接拼接用户输入构造 SQL,未使用参数化查询
  2. 硬编码密钥:API Key、数据库密码等直接写在源码中
  3. 未校验权限:敏感接口缺少身份认证和权限校验
  4. XSS 盲区:前端输出未转义,尤其是 v-html/dangerouslySetInnerHTML
  5. Token 明文:Token 存储在 localStorage 而非 HttpOnly Cookie
  6. 错误信息泄露:异常堆栈直接返回给客户端
  7. 文件上传无校验:仅校验扩展名,未校验文件内容
  8. CORS 放宽:使用 * 允许所有来源访问 API

Frequently asked questions

What does the Security Review AI skill do?

安全审查专家助手。在代码编写完成后进行安全扫描,涵盖注入攻击、认证授权、数据安全、配置安全、依赖安全,减少代码安全漏洞和风险。

Why use Security Review on TypingMind?

Because you install it once and use it with any model. Security Review is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Security Review in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/dkbnull/hello-skill/tree/main/common/skills/security-review. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Security Review?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Security Review?

As many as you like. As long as a model supports skills, you can use Security Review with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Security Review AI skill free?

Yes. It is published on GitHub by dkbnull under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇