Token导航 LogoToken导航TokenDH.com
研究检索敏感数据github未标认证来源可访问许可证需确认审计异常

security-review安全审查

Agent Skill

用于辅助安全审计、权限检查、凭据风险、认证流程和常见漏洞排查。它适合让 Agent 梳理敏感配置、检查依赖风险、分析鉴权逻辑或生成安全复核清单。使用时不能把工具输出直接当最终结论,涉及密钥、令牌、用户数据或生产系统时,应先确认最小权限、脱敏方式和操作边界。

总安装

282

周安装

12

GitHub Stars

公开资料未说明

下载量

99
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:security-review(安全审查)
来源仓库:https://github.com/nayuta/agent-skills
仓库路径:skills/security-review
安装命令:
npx skills add https://github.com/nayuta/agent-skills --skill security-review
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/nayuta/agent-skills --skill security-review

简介

security-review 用于辅助安全审计、权限检查和常见漏洞排查,适合让 Agent 梳理敏感配置或生成复核清单。

  • 适用于研究检索类任务,可协助分析鉴权逻辑与依赖风险。
  • 通过 npx skills add 命令从指定 GitHub 仓库安装,具体路径为 skills/security-review。
  • 使用时不能将工具输出直接当作最终结论,涉及密钥或生产系统时应先确认最小权限。
  • 建议结合原始 README 文档进一步核验功能细节与使用边界。

SKILL.md

Security Review

Purpose

Systematically analyze code for security vulnerabilities using structured AI reasoning. Produces a confidence-filtered report with actionable remediation.

Scan Modes

ModeFlagSource of files to review
Diff (default)*(none)*Files changed in the current branch (git diff)
Full codebase--fullAll tracked source files (git ls-files)

Use diff mode (default) for pre-merge reviews to focus on what changed. Use --full when onboarding a new codebase, performing a periodic audit, or when no branch diff is available.

Workflow

Phase 1: Repository Context

Before analyzing file content, build context to reduce false positives:

  1. Read key project files: CLAUDE.md, README.md, CONTRIBUTING.md, SECURITY.md
  2. Identify tech stack, frameworks, ORM, auth library, and HTTP server
  3. Note existing security patterns (middleware, validation helpers, auth guards)
  4. Identify sensitive file types for this project (config, migrations, API handlers)

Phase 2: Gather Files to Review

Default mode (diff only)

Collect the diff to review:

# Changes vs. main branch
git diff --merge-base origin/main

# Or vs. current remote HEAD
git diff origin/HEAD...HEAD

# Fallback: uncommitted changes
git diff HEAD

If the diff is empty, report "No changes to review" and stop.

Also note which files were changed:

git diff --name-only origin/main...HEAD

Full mode (--full)

Collect all tracked source files instead of the diff:

git ls-files

If the repository is not a git repo, use:

find . -type f \
  ! -path '*/.git/*' \
  ! -path '*/node_modules/*' \
  ! -path '*/__pycache__/*' \
  ! -path '*/vendor/*' \
  ! -path '*/.venv/*'

Filter out binary, generated, and non-source files (images, compiled artifacts, lock files, minified assets). Focus on files likely to contain executable logic: source code, configuration templates, infrastructure definitions, and scripts.

If the file set is large (> 200 files), prioritise by security sensitivity:

  1. Auth, session, and permission handlers
  2. API route handlers and controllers
  3. Database query builders and ORMs
  4. Configuration files and environment templates
  5. Remaining source files

Note which files are being reviewed in the Phase 5 report header.

Phase 3: Vulnerability Analysis

Systematically check each reviewed file against all 8 categories below. Work through each category in order. For each finding, record:

  • Category and sub-type
  • File and line number
  • Evidence (the exact code snippet)
  • Impact (what an attacker could do)
  • Confidence (1–10, explained in Phase 4)

Category 1: Secrets and Credentials

Patterns to find:

  • Hardcoded API keys, tokens, passwords, private keys in source
  • Credentials embedded in connection strings or URLs
  • Secrets committed to config files not in .gitignore
  • Environment variable values (not references) in source code

Signs it is NOT a finding:

  • Value contains example, test, dummy, placeholder, your-key-here
  • File is in tests/, fixtures/, examples/, docs/
  • Key is a public key or certificate (not private)

Category 2: Injection

Sub-types to check:

Sub-typePatterns
SQL injectionString concatenation or interpolation into query, raw query builders
Command injectionexec, spawn, system, shell_exec with user-controlled input
LDAP injectionUnescaped user input in LDAP filters
Template injectionUser input rendered through template engines
XPath / XML injectionUser input in XPath expressions or XML parsers
NoSQL injectionUnvalidated objects passed to find(), aggregate(), etc.

Signs it is NOT a finding:

  • Parameterized queries / prepared statements used
  • Input validated to a strict allowlist before use
  • Query builder with explicit escaping (e.g., knex, sqlalchemy ORM methods)

Category 3: Authentication and Authorization

Check for:

  • Missing authentication guards on new endpoints or routes
  • Insecure direct object reference (IDOR): resource ID taken from user input without ownership check
  • Privilege escalation: role or permission check missing or bypassable
  • Broken JWT validation: algorithm confusion (alg: none), missing signature check, missing expiry check
  • Session fixation or session not invalidated on logout/privilege change
  • Password hashing: plaintext storage, MD5/SHA1 without salt

Signs it is NOT a finding:

  • Auth middleware applied at router level (covers all child routes)
  • Resource fetched with user ID scoped query (WHERE user_id = current_user_id)

Category 4: Cryptography

Check for:

  • Weak algorithms: MD5, SHA1, DES, 3DES, RC4 for security purposes
  • Static IVs or nonces used with AES-GCM or ChaCha20
  • Insufficient key lengths (RSA < 2048 bits, EC < 256 bits)
  • Math.random() or rand() used for security tokens, session IDs, or CSRF tokens
  • Custom crypto implementation replacing standard library

Signs it is NOT a finding:

  • Weak hash used only for cache keys, ETags, or content deduplication (not security)
  • Algorithm is for checksum / data integrity, not authentication

Category 5: Input Validation and Output Encoding

Check for:

  • Cross-site scripting (XSS): user input rendered as HTML without escaping
  • Server-side request forgery (SSRF): user-supplied URL fetched server-side without allowlist
  • Path traversal: user input used in file paths without normalization
  • Open redirect: user-controlled redirect URL without domain validation
  • Unsafe deserialization: pickle.loads, yaml.load (without Loader), eval, JSON.parse on untrusted input
  • ReDoS: unbounded regex on user input

Signs it is NOT a finding:

  • Framework auto-escapes template output (check framework docs)
  • URL validated against explicit allowlist of known-good domains
  • File path resolved with realpath and checked to remain within base directory

Category 6: Sensitive Data Exposure

Check for:

  • PII, passwords, tokens logged to application logs
  • Sensitive fields returned in API responses that should be excluded
  • Detailed error messages (stack traces, internal paths, DB errors) returned to client
  • Sensitive data stored in browser localStorage or cookies without HttpOnly/Secure flags

Signs it is NOT a finding:

  • Logging in a debug-only path behind feature flag
  • Error handler strips stack traces in production builds

Category 7: Dependency Risks

Check for:

  • New packages added with known CVEs (cross-reference security-scan output)
  • npm install --legacy-peer-deps or pip install --trusted-host bypassing integrity checks
  • Package version pinned to a compromised version range
  • Direct use of eval-style packages (node-serialize, serialize-javascript < 3.1)

Signs it is NOT a finding:

  • Package used only in dev/test environment
  • Vulnerability does not affect the code path used

Category 8: Security Configuration

Check for:

  • New endpoints missing rate limiting or authentication middleware
  • CORS wildcard (Access-Control-Allow-Origin: *) on authenticated endpoints
  • Disabled CSRF protection
  • DEBUG=True or equivalent in production configuration
  • TLS verification disabled (verify=False, InsecureSkipVerify: true)
  • Exposed admin panels, metrics endpoints, or debug routes without access control

Signs it is NOT a finding:

  • Wildcard CORS on a fully public, read-only API
  • TLS skip in test environment code never deployed to production

Phase 4: False Positive Filtering

For each potential finding, apply the confidence score:

ScoreMeaning
10Exploitable with certainty, clear reproduction path
9Very likely exploitable, minor assumption required
8Likely exploitable, context supports it
7Possibly exploitable, but requires more investigation
≤6Probable false positive or low-impact edge case

Only include findings with confidence ≥ 8 in the final report.

Factors that increase confidence:

  • User input flows directly to sink with no sanitization in the reviewed code
  • New code, not an existing pattern (reduces "was already there" dismissals)
  • Impact is high (RCE, auth bypass, data exfiltration)

Factors that decrease confidence:

  • Framework or library likely handles it transparently
  • Existing middleware or validation covers the case
  • Finding is in test or documentation code

Phase 5: Report

If there are no findings with confidence ≥ 8:

## Security Review

**Date**: <ISO 8601>
**Mode**: diff | full
**Files reviewed**: N
**Findings**: None above confidence threshold.

No high-confidence security vulnerabilities found in the reviewed files.
Run security-scan for tool-based secret and dependency checks.

Otherwise, use this format:

## Security Review

**Date**: <ISO 8601>
**Mode**: diff | full
**Branch**: <branch-name> ← omit in full mode if not on a feature branch
**Files reviewed**: N
**High-confidence findings**: N (Critical: N | High: N | Medium: N)

---

## Critical

### [SEC-001] <Vulnerability type> in <component>

**File**: `path/to/file.ts:42`
**Category**: Injection > SQL Injection
**Confidence**: 9/10

**Evidence**:
\`\`\`typescript
const result = db.query(`SELECT * FROM users WHERE id = ${req.params.id}`);
\`\`\`

**Impact**: Attacker can read, modify, or delete arbitrary database records.

**Remediation**:
\`\`\`typescript
const result = db.query("SELECT \* FROM users WHERE id = $1", [req.params.id]);
\`\`\`

---

## High

### [SEC-002] ...

---

## Medium

### [SEC-003] ...

---

## Recommended Next Steps

1. Fix Critical and High findings before merging
2. Run `security-scan` for dependency and secret scanning
3. Add regression tests for confirmed vulnerabilities

Integration

  • Run security-scan first to catch secrets and known CVEs in dependencies
  • Use this skill for AI reasoning over logic flaws and design issues
  • Together they form a complete pre-merge security gate
  • For a full codebase audit, run both with --full:

- /security-scan --full then /security-review --full

References

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

35.43%
按下载量换算35

Claude

32.68%
按下载量换算32

Cursor

19.58%
按下载量换算19

Gemini CLI

9.15%
按下载量换算9

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

未通过

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills