Security Review

在添加身份验证、处理用户输入、操作机密信息(Secrets)、创建 API 端点以及实现支付/敏感功能时使用此技能。提供全面的安全检查清单和模式。

2,037 stars 332 forksSecurity Plugin marketplace

Install

Claude Code plugin
/plugin marketplace add xu-xiang/everything-claude-code-zh

The repo is a Claude Code plugin marketplace. Run /plugin afterwards to pick the plugin that includes this skill.

skills CLI (Claude Code, Cursor, Codex and more)
npx skills add xu-xiang/everything-claude-code-zh --skill security-review
Manual install
git clone --depth 1 https://github.com/xu-xiang/everything-claude-code-zh.git /tmp/everything-claude-code-zh
mkdir -p ~/.claude/skills
cp -r /tmp/everything-claude-code-zh/docs/ja-JP/skills/security-review ~/.claude/skills/security-review

Personal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.

From the SKILL.md

# 安全审查技能 (Security Review Skill)

此技能旨在确保所有代码遵循安全最佳实践,并识别潜在漏洞。

## 激活时机

- 实现身份验证 (Authentication) 或授权 (Authorization) 时
- 处理用户输入或文件上传时
- 创建新的 API 端点时
- 操作机密信息 (Secrets) 或凭据时
- 实现支付功能时
- 存储或传输敏感数据时
- 集成第三方 API 时

## 安全检查清单

### 1. 机密信息管理 (Secret Management)

#### ❌ 严禁行为
```typescript
const apiKey = "sk-proj-xxxxx"  // 硬编码的机密信息
const dbPassword = "password123" // 存在于源码中
```

#### ✅ 始终遵循
```typescript
const apiKey = process.env.OPENAI_API_KEY
const dbUrl = process.env.DATABASE_URL

// 确保机密信息存在
if (!apiKey) {
  throw new Error('OPENAI_API_KEY not configured')
}
```

#### 验证步骤
- [ ] 无硬编码的 API 密钥、令牌或密码
- [ ] 所有机密信息均通过环境变量管理
- [ ] 将 `.env.local` 添加到 .gitignore
- [ ] Git 历史记录中不包含机密信息
- [ ] 生产环境机密信息存储在托管平台(如 Vercel、Railway)

### 2. 输入验证 (Input Validation)

#### 始终验证用户输入
```typescript
import { z } from 'zod'

// 定义验证 Schema
const CreateUserSchema = z.object({
  email: z.string().email(),
  name: z.string().min(1).max(100),
  age: z.number().int().min(0).max(150)
})

// 处理前验证
export async function createUser(input: unknown) {
  try {
    const validated = CreateUserSchema.parse(input)
    return await db.users.create(validated)
  } catch (error) {
    if (error instanceof z.ZodError) {
      return { success: false, errors: error.errors }
    }
    throw error
  }
}
```

#### 文件上传验证
Read the full skill on GitHub

Details

Skill name
security-review
Path
docs/ja-JP/skills/security-review/SKILL.md
License
MIT
Repo updated
5 March 2026

FAQ

What does the Security Review skill do?

在添加身份验证、处理用户输入、操作机密信息(Secrets)、创建 API 端点以及实现支付/敏感功能时使用此技能。提供全面的安全检查清单和模式。

How do I install the Security Review skill?

Claude Code plugin: /plugin marketplace add xu-xiang/everything-claude-code-zh. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.

Is Security Review popular?

It lives in xu-xiang/everything-claude-code-zh, which has 2,037 GitHub stars and 332 forks.

Related skills

Browse the most popular Claude skills, all security skills, or write your own with the skills generator.