security-vulnerability-scan
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinesesecurity-vulnerability-scan
安全漏洞扫描工具
OWASP Top 10:2025-aligned vulnerability scanner for any codebase. Static-only (no source files modified); produces a persisted Markdown report under in the project root and echoes the path back to the user.
audit/<YYYY-MM-DD>/report.md符合OWASP Top 10:2025标准的代码库漏洞扫描工具。仅执行静态扫描(不会修改源文件);会在项目根目录的路径下生成持久化Markdown报告,并向用户返回报告路径。
audit/<YYYY-MM-DD>/report.mdWhen I Activate
触发场景
Activate proactively on any of the following — do not wait for the literal phrase "use the security-vulnerability-scan skill":
- "review this code", "code review", "PR review", "review my app"
- "security review", "security audit", "audit this app", "audit my code"
- "scan for vulnerabilities", "vulnerability scan", "find vulnerabilities", "OWASP scan"
- "look for improvements", "find issues", "what could be better", "what should I fix"
- "harden security", "secure this", "make it more secure", "lock down"
- "check for OWASP", "OWASP Top 10", "CVE check", "CWE", "threat model"
- "find secrets", "leaked credentials", "exposed keys", "secret scan"
- "pentest this", "attack surface", "assess risk", "risk assessment"
- "audit dependencies", "vulnerable packages", "dependency audit", "outdated packages"
When in doubt, trigger. Overtriggering this skill is cheap; missing a real security review is expensive.
出现以下任意场景时主动触发,无需等待用户明确说出“使用security-vulnerability-scan技能”:
- "审查这段代码"、"代码审查"、"PR审查"、"审查我的应用"
- "安全审查"、"安全审计"、"审计这个应用"、"审计我的代码"
- "扫描漏洞"、"漏洞扫描"、"查找漏洞"、"OWASP扫描"
- "寻找改进点"、"查找问题"、"哪些地方可以优化"、"我应该修复什么"
- "强化安全"、"保障安全"、"提升安全性"、"锁定安全"
- "检查OWASP"、"OWASP Top 10"、"CVE检查"、"CWE"、"威胁模型"
- "查找密钥"、"凭证泄露"、"密钥暴露"、"密钥扫描"
- "渗透测试"、"攻击面分析"、"风险评估"、"风险评价"
- "审计依赖"、"易受攻击的包"、"依赖审计"、"过时包"
如有疑问,直接触发。过度触发本技能的成本很低,但遗漏真实安全审查的代价极高。
Read/Write Contract
读写规则
- Read the project freely: source files, configs, lockfiles, manifests.
- Write exactly one location: (or a timestamped variant if it already exists).
<project root>/audit/<YYYY-MM-DD>/report.md - Never modify source files, configs, dependencies, lockfiles, ,
.gitignore, or anything outside.env*.audit/ - No outbound network calls are required after Step 0 (clone) completes. Optional dependency-audit shell calls (,
npm audit, …) require network and exec — mark them as skipped in sandboxed environments.pip-audit
- 读取权限:可自由读取项目中的源文件、配置文件、锁文件、清单文件。
- 写入权限:仅能写入一个位置:(若该文件已存在,则使用带时间戳的变体)。
<项目根目录>/audit/<YYYY-MM-DD>/report.md - 禁止修改:不得修改源文件、配置文件、依赖项、锁文件、、
.gitignore或.env*目录以外的任何内容。audit/ - 网络调用规则:完成步骤0(克隆)后无需进行出站网络调用。可选的依赖审计Shell调用(、
npm audit等)需要网络和执行权限——在沙箱环境中需标记为已跳过。pip-audit
Step 0 — Bootstrap Decision
步骤0 — 初始化判断
Determine whether the working directory already contains a project, or is blank and needs a clone.
bash
undefined判断工作目录是否已包含项目,或是空白目录需要克隆项目。
bash
undefinedInside a git repo?
是否在git仓库内?
git rev-parse --is-inside-work-tree 2>/dev/null
Also check for telltale project files:
```bashgit rev-parse --is-inside-work-tree 2>/dev/null
同时检查标志性项目文件:
```bashGlob '**/*' capped — if nothing meaningful, treat as blank.
匹配'**/*'但限制范围——若未找到有意义的文件,则视为空白目录。
Use Glob to look for any of: `package.json`, `pyproject.toml`, `requirements.txt`, `go.mod`, `pom.xml`, `build.gradle`, `Gemfile`, `Cargo.toml`, `composer.json`, `*.csproj`, `*.sln`, `Dockerfile`, `*.tf`.
**If populated:** skip to Step 1.
**If blank:** ask the user for a GitHub URL. Then clone:
```bash
gh repo clone <url> . # preferred — uses gh auth
使用Glob查找以下任意文件:`package.json`、`pyproject.toml`、`requirements.txt`、`go.mod`、`pom.xml`、`build.gradle`、`Gemfile`、`Cargo.toml`、`composer.json`、`*.csproj`、`*.sln`、`Dockerfile`、`*.tf`。
**若目录非空**:跳至步骤1。
**若目录为空**:向用户索要GitHub URL,然后克隆项目:
```bash
gh repo clone <url> . # 优先使用——借助gh认证fallback if gh unavailable:
若gh不可用则使用备选方案:
git clone <url> .
Re-run the populated check and proceed to Step 1. If both clone commands fail, stop and report the error verbatim; do not improvise.git clone <url> .
重新执行非空检查后进入步骤1。若两种克隆命令均失败,则停止操作并如实报告错误;不得自行变通。Step 1 — Recon
步骤1 — 技术栈识别
Identify the stack so subsequent checks are framework-aware.
| Signal | Detect via | What it tells you |
|---|---|---|
| Read | Node/JS; check |
| Read | Python; check for django/flask/fastapi |
| Read | Go; framework is in imports (gin/echo/fiber/chi) |
| Read | Java/Kotlin; spring-boot/quarkus |
| Read | Ruby; rails/sinatra |
| Read | Rust; actix-web/axum/rocket |
| Read | PHP; laravel/symfony |
| Glob+Read | .NET; aspnetcore version |
| Read | Runtime base images; exposed ports; build steps |
| Glob+Read | CI/CD posture for A03/A08 |
| Glob | IaC for A02 misconfig |
| Glob | Configuration surface, secret leak risk |
Capture: language(s), web framework(s), DB driver(s), auth library, runtime image, CI provider, package manager. Use this profile to prioritize Step 4 framework checks.
识别项目技术栈,以便后续检查适配对应框架。
| 信号 | 检测方式 | 说明 |
|---|---|---|
| 读取文件 | Node/JS技术栈;检查 |
| 读取文件 | Python技术栈;检查django/flask/fastapi等框架 |
| 读取文件 | Go技术栈;从导入语句中识别框架(gin/echo/fiber/chi) |
| 读取文件 | Java/Kotlin技术栈;spring-boot/quarkus等框架 |
| 读取文件 | Ruby技术栈;rails/sinatra等框架 |
| 读取文件 | Rust技术栈;actix-web/axum/rocket等框架 |
| 读取文件 | PHP技术栈;laravel/symfony等框架 |
| 匹配+读取 | .NET技术栈;aspnetcore版本 |
| 读取文件 | 运行时基础镜像;暴露端口;构建步骤 |
| 匹配+读取 | 用于A03/A08类问题的CI/CD配置检查 |
| 匹配 | 用于A02类配置错误的IaC(基础设施即代码)检查 |
| 匹配 | 配置面、密钥泄露风险检查 |
记录:语言、Web框架、数据库驱动、认证库、运行时镜像、CI提供商、包管理器。利用此信息优先执行步骤4中的框架针对性检查。
Step 2 — OWASP Top 10:2025 Static Scan
步骤2 — OWASP Top 10:2025静态扫描
One short scan section per category. Each section ends with a pointer to the reference file, which you load on demand only when triaging a specific finding in that category.
每个类别对应一个简短的扫描章节。每个章节末尾需指向参考文件,仅在分类排查具体问题时按需加载该文件。
A01:2025 — Broken Access Control
A01:2025 — 访问控制失效
Grep targets (Node/Python/Go syntaxes shown; adapt to stack):
- Missing auth middleware on routes: without an
app\.(get|post|put|delete|patch)\s*\(/authenticate/authorize-style guard nearby.requireAuth - IDOR risk: queries by primary key that don't scope to the session user: ,
findByPk\(req\.(params|body|query)\.id\)without a tenant/user filter.WHERE id\s*=\s*\$\{ - Mass assignment: spread into a model
req\.body,User.create({...req.body}).User.update(req.body) - Path traversal: /
path.join/fs.readwith unsanitized user input. Look foropen(allowed in supplied paths... - CORS wildcard with credentials: next to
Access-Control-Allow-Origin:\s*\*.Access-Control-Allow-Credentials:\s*true - JWT accepted, JWT decode without verify, JWT secret hard-coded.
alg: none - Hidden admin/debug routes: grep for ,
/admin,/debug,/internaland check guard presence./__
For full guidance (description, prevention, attack scenarios, mapped CWEs), readbefore recommending fixes.references/A01_2025-Broken_Access_Control.md
Grep扫描目标(示例为Node/Python/Go语法;需适配对应技术栈):
- 路由缺少认证中间件:附近无
app\.(get|post|put|delete|patch)\s*\(/authenticate/authorize类守卫。requireAuth - IDOR(不安全的直接对象引用)风险:查询主键时未限定会话用户范围:、
findByPk\(req\.(params|body|query)\.id\)未添加租户/用户过滤条件。WHERE id\s*=\s*\$\{ - 批量赋值:直接扩展到模型中
req\.body、User.create({...req.body})。User.update(req.body) - 路径遍历:/
path.join/fs.read使用未净化的用户输入。查找路径中允许open(的情况。.. - CORS通配符与凭证共存:与
Access-Control-Allow-Origin:\s*\*同时存在。Access-Control-Allow-Credentials:\s*true - JWT接受算法、解码JWT时未验证、JWT密钥硬编码。
alg: none - 隐藏的管理员/调试路由:查找、
/admin、/debug、/internal路径并检查是否有守卫。/__
如需完整指导(描述、预防方案、攻击场景、对应CWE),在推荐修复方案前请阅读。references/A01_2025-Broken_Access_Control.md
A02:2025 — Security Misconfiguration
A02:2025 — 安全配置错误
Grep / file checks:
- Debug/verbose error pages in prod: ,
DEBUG\s*=\s*True,app.debug = Truedefaulting to development.NODE_ENV - Default credentials in configs: ,
admin:admin,root:root.password=changeme - Permissive CORS, missing Helmet/, missing security headers (
helmet(),Strict-Transport-Security,Content-Security-Policy,X-Content-Type-Options,Referrer-Policy).Permissions-Policy - Open S3/GCS buckets: ,
acl: public-read,BucketAccessControl.PUBLIC_READ.iam.PublicAccessPrevention: inherited - Container hygiene: ,
FROM .*:latestleft in final stage,USER rootwithoutapt-get install, missing--no-install-recommends.rm -rf /var/lib/apt/lists/* - Docker-compose with ports bound to dev-only services.
0.0.0.0: - Terraform/CDK: ingress rules, public RDS, unencrypted S3.
0.0.0.0/0 - Sample apps / ,
/swagger,/api-docsexposed without auth in non-dev./graphql
For full guidance, read.references/A02_2025-Security_Misconfiguration.md
Grep/文件检查:
- 生产环境中启用调试/详细错误页面:、
DEBUG\s*=\s*True、app.debug = True默认设为开发环境。NODE_ENV - 配置文件中存在默认凭证:、
admin:admin、root:root。password=changeme - CORS配置过于宽松、未安装Helmet/、缺少安全头(
helmet()、Strict-Transport-Security、Content-Security-Policy、X-Content-Type-Options、Referrer-Policy)。Permissions-Policy - 开放的S3/GCS存储桶:、
acl: public-read、BucketAccessControl.PUBLIC_READ。iam.PublicAccessPrevention: inherited - 容器卫生问题:、最终阶段保留
FROM .*:latest、USER root未添加apt-get install、未执行--no-install-recommends。rm -rf /var/lib/apt/lists/* - Docker-compose将开发专用服务绑定到端口。
0.0.0.0: - Terraform/CDK:入站规则、公开的RDS、未加密的S3。
0.0.0.0/0 - 非开发环境中暴露示例应用/、
/swagger、/api-docs且未加认证。/graphql
如需完整指导,请阅读。references/A02_2025-Security_Misconfiguration.md
A03:2025 — Software Supply Chain Failures
A03:2025 — 软件供应链故障
Lockfile + dependency checks:
- Confirm a lockfile exists: ,
package-lock.json,yarn.lock,pnpm-lock.yaml,poetry.lock,Pipfile.lock,go.sum,Gemfile.lock. No lockfile is itself a finding.Cargo.lock - Known-vulnerable packages: run if available — ,
npm audit --json,pip-audit -f json,bundle audit,cargo audit,govulncheck ./.... Mark as skipped if exec/network is forbidden.osv-scanner -r . - GitHub Actions pinning: grep workflows for (tag-pinned) vs
uses:\s*[\w/-]+@v?\d+(SHA-pinned). Tag-pinned third-party actions are findings.uses:\s*[\w/-]+@[0-9a-f]{40} - Registry trust: /
.npmrc/pip.confreferencing unknown registries..cargo/config.toml - Auto-update without signature: code that downloads + runs binaries (in Dockerfile/CI scripts).
curl ... | sh - Direct fetches from or
raw.githubusercontent.comin build scripts.gist.github.com - SBOM presence: any ,
sbom.json,bom.xml,*.cdx.json. Absence is a finding.*.spdx.json
For full guidance, read.references/A03_2025-Software_Supply_Chain_Failures.md
锁文件+依赖检查:
- 确认锁文件存在:、
package-lock.json、yarn.lock、pnpm-lock.yaml、poetry.lock、Pipfile.lock、go.sum、Gemfile.lock。无锁文件本身即视为问题。Cargo.lock - 已知易受攻击的包:若允许则执行——、
npm audit --json、pip-audit -f json、bundle audit、cargo audit、govulncheck ./...。若禁止执行/网络调用则标记为已跳过。osv-scanner -r . - GitHub Actions版本固定:查找工作流中(标签固定)与
uses:\s*[\w/-]+@v?\d+(SHA固定)。使用标签固定的第三方Action视为问题。uses:\s*[\w/-]+@[0-9a-f]{40} - 仓库可信度:/
.npmrc/pip.conf引用未知仓库。.cargo/config.toml - 无签名的自动更新:代码中存在下载并运行二进制文件的逻辑(Dockerfile/CI脚本中的)。
curl ... | sh - 构建脚本中直接从或
raw.githubusercontent.com获取内容。gist.github.com - SBOM存在性:检查是否有、
sbom.json、bom.xml、*.cdx.json。不存在SBOM视为问题。*.spdx.json
如需完整指导,请阅读。references/A03_2025-Software_Supply_Chain_Failures.md
A04:2025 — Cryptographic Failures
A04:2025 — 加密机制失效
Grep targets:
- Weak hashes for security: ,
\b(md5|sha1)\b,crypto.createHash\(['"](md5|sha1)['"]\).hashlib\.(md5|sha1)\( - Weak ciphers: ,
\b(DES|3DES|RC4|ECB)\b,Cipher\.getInstance\(['"](DES|RC4|.*ECB)['"]\)(deprecated; no IV).crypto.createCipher\( - Bad randomness for security: ,
Math\.random\(\),rand\(\),random\.random\(\)— flag near token/password-reset/CSRF generation.new Random\(\) - Cert validation disabled: ,
rejectUnauthorized:\s*false,verify=False,InsecureSkipVerify:\s*true.ServicePointManager\.ServerCertificateValidationCallback - Hard-coded keys / IVs / secrets: .
(?i)(secret|key|password|token|api[_-]?key)\s*[:=]\s*['"][^'"]{8,}['"] - Plain HTTP: URLs to internal services in non-localhost contexts.
http:// - TLS downgrades: ,
TLSv1\b, ciphersuite strings allowingSSLv3or:RC4:.:NULL: - Password storage without KDF: /
bcrypt/scrypt/argon2absent and passwords being hashed with bare SHA-* or stored plain.pbkdf2 - AES-GCM nonce reuse risk: where
createCipheriv\('aes-...-gcm', key, iv)is constant or counter-derived from a recycled source.iv
For full guidance, read.references/A04_2025-Cryptographic_Failures.md
Grep扫描目标:
- 使用弱哈希算法处理安全相关数据:、
\b(md5|sha1)\b、crypto.createHash\(['"](md5|sha1)['"]\)。hashlib\.(md5|sha1)\( - 使用弱密码算法:、
\b(DES|3DES|RC4|ECB)\b、Cipher\.getInstance\(['"](DES|RC4|.*ECB)['"]\)(已弃用;无IV)。crypto.createCipher\( - 安全场景中使用弱随机数:、
Math\.random\(\)、rand\(\)、random\.random\(\)——在令牌/密码重置/CSRF生成附近标记此类代码。new Random\(\) - 禁用证书验证:、
rejectUnauthorized:\s*false、verify=False、InsecureSkipVerify:\s*true。ServicePointManager\.ServerCertificateValidationCallback - 硬编码密钥/IV/密钥:。
(?i)(secret|key|password|token|api[_-]?key)\s*[:=]\s*['"][^'"]{8,}['"] - 使用明文HTTP:非本地环境中内部服务使用URL。
http:// - TLS降级:、
TLSv1\b、密码套件字符串允许SSLv3或:RC4:。:NULL: - 密码存储未使用KDF:未使用/
bcrypt/scrypt/argon2,密码使用裸SHA-*哈希或明文存储。pbkdf2 - AES-GCM随机数重用风险:中
createCipheriv\('aes-...-gcm', key, iv)为常量或从循环源派生的计数器。iv
如需完整指导,请阅读。references/A04_2025-Cryptographic_Failures.md
A05:2025 — Injection
A05:2025 — 注入攻击
Grep targets:
- SQL string concatenation / template-literal interpolation: ][^'"`]${
(query|execute|raw)\s*\(\s*['"\'\s+\sreq.,f"SELECT . {,String.format(.*SELECT`., - ORM raw escapes: ,
sequelize\.literal\(,Sequelize\.QueryTypes\.RAW,Model\.findAll\(\{\s*where:\s*\[.db\.execute\(" - NoSQL: passed directly to
req\.body\.\w+/findwithout shape validation;findOnepatterns in user-controlled input.where:\s*\{[^}]*\$ne - Shell injection: /
exec\(with concatenation;execSync\(;spawn\(.*,\s*{\s*shell:\s*true,os.system\(,subprocess\..*shell=True.Runtime\.exec - XSS: ,
dangerouslySetInnerHTML,v-html,\|safe,Element\.innerHTML\s*=, server templates withdocument\.write\(/{!! !!}on user data.<%== %> - SSTI: ,
Template\(.*\+,render_template_string\(.eval\(.*req\. - LDAP injection: filter string concatenation with user input.
- Eval/dynamic code: ,
eval\(,new Function\(,setTimeout\(string.vm\.runInNewContext\( - LLM/agent context (2025): tool outputs / fetched docs / RAG context passed verbatim into prompts without separation.
For full guidance, read.references/A05_2025-Injection.md
Grep扫描目标:
- SQL字符串拼接/模板字面量插值:][^'"`]${
(query|execute|raw)\s*\(\s*['"\'\s+\sreq.、f"SELECT . {、String.format(.*SELECT`。、 - ORM原生SQL使用:、
sequelize\.literal\(、Sequelize\.QueryTypes\.RAW、Model\.findAll\(\{\s*where:\s*\[。db\.execute\(" - NoSQL注入:直接传入
req\.body\.\w+/find且未做格式验证;用户可控输入中存在findOne模式。where:\s*\{[^}]*\$ne - Shell注入:/
exec\(使用字符串拼接;execSync\(;spawn\(.*,\s*{\s*shell:\s*true、os.system\(、subprocess\..*shell=True。Runtime\.exec - XSS攻击:、
dangerouslySetInnerHTML、v-html、\|safe、Element\.innerHTML\s*=、服务器模板中对用户数据使用document\.write\(/{!! !!}。<%== %> - SSTI(服务器端模板注入):、
Template\(.*\+、render_template_string\(。eval\(.*req\. - LDAP注入:过滤字符串与用户输入拼接。
- Eval/动态代码:、
eval\(、new Function\(、setTimeout\(string。vm\.runInNewContext\( - LLM/Agent上下文(2025):工具输出/获取的文档/RAG上下文直接传入提示词未做隔离。
如需完整指导,请阅读。references/A05_2025-Injection.md
A06:2025 — Insecure Design
A06:2025 — 不安全设计
Static signals (these often need a brief design read, not just grep):
- Login endpoint without rate limiting middleware (,
express-rate-limit,flask-limiter, gateway-level limit).django-ratelimit - No CAPTCHA / anti-automation on password reset, registration, MFA challenge.
- Workflow endpoints without server-side state checks (e.g., accepts any order ID without re-checking payment state).
/order/confirm - Server-trusted client-computed values: ,
req.body.total,req.body.rolewritten to DB without recomputation.req.body.discount - Single-tenant query patterns in a multi-tenant schema: any /
Model.findAll()withoutSELECT * FROM tablein code that handles tenant data.WHERE tenant_id = - URL fetchers that accept arbitrary destinations: ,
axios.get(req.body.url)with no allow-list / metadata-IP block.fetch(userInput) - File uploads without type/size/storage-path enforcement.
- Recursive parsers / regex without complexity bounds (ReDoS risk).
- No abuse-case tests — search for tests named ,
should_reject_,unauthenticated_,forbidden_. Sparse coverage is a finding.denies_
For full guidance, read.references/A06_2025-Insecure_Design.md
静态信号(通常需简要阅读设计而非仅依赖grep):
- 登录端点未配置速率限制中间件(、
express-rate-limit、flask-limiter、网关级限制)。django-ratelimit - 密码重置、注册、MFA验证环节无CAPTCHA/反自动化机制。
- 工作流端点未做服务器端状态检查(例如接受任意订单ID而未重新检查支付状态)。
/order/confirm - 服务器信任客户端计算的值:、
req.body.total、req.body.role写入数据库前未重新计算。req.body.discount - 多租户架构中使用单租户查询模式:处理租户数据的代码中存在/
Model.findAll()且未添加SELECT * FROM table条件。WHERE tenant_id = - URL获取器接受任意目标:、
axios.get(req.body.url)未配置允许列表/元数据IP拦截。fetch(userInput) - 文件上传未限制类型/大小/存储路径。
- 递归解析器/无复杂度限制的正则表达式(ReDoS风险)。
- 无滥用场景测试——查找命名为、
should_reject_、unauthenticated_、forbidden_的测试用例。测试覆盖率不足视为问题。denies_
如需完整指导,请阅读。references/A06_2025-Insecure_Design.md
A07:2025 — Authentication Failures
A07:2025 — 认证机制失效
Grep targets:
- Missing MFA enforcement on admin/privileged routes.
- Hard-coded credentials in source: ,
password\s*=\s*['"][^'"]+['"]in code or configs.Authorization:\s*Basic\s+[A-Za-z0-9+/=]+ - Session ID in URL: ,
req\.query\.sessionpatterns,?token=in redirect URLs.sessionid - Session not rotated on login: look for session-store /
setafter auth without a priorsave/regenerate.rotate - JWT without revocation: any JWT issuance code with no corresponding blocklist / refresh-token rotation.
- Weak password policy / no breached-password check: registration handler that accepts any non-empty password.
- Username enumeration: differing responses on login/reset/register for "user exists" vs "user does not exist."
- No rate limit on login/reset/MFA endpoints.
- OAuth/OIDC issues: parsed from request and used without allow-list check;
redirect_uriparameter missing;stateaccepted on ID tokens.alg: none - Default/well-known passwords in seed data, fixtures, or examples that may be copy-pasted to prod.
For full guidance, read.references/A07_2025-Authentication_Failures.md
Grep扫描目标:
- 管理员/特权路由未强制启用MFA。
- 源代码中存在硬编码凭证:、代码或配置中存在
password\s*=\s*['"][^'"]+['"]。Authorization:\s*Basic\s+[A-Za-z0-9+/=]+ - URL中包含会话ID:、
req\.query\.session模式、重定向URL中包含?token=。sessionid - 登录时未轮换会话:查找认证后会话存储/
set操作前未执行save/regenerate的代码。rotate - JWT无吊销机制:存在JWT签发代码但无对应的黑名单/刷新令牌轮换逻辑。
- 弱密码策略/无泄露密码检查:注册接口接受任意非空密码。
- 用户名枚举:登录/重置/注册环节中“用户存在”与“用户不存在”返回不同响应。
- 登录/重置/MFA端点无速率限制。
- OAuth/OIDC问题:从请求中解析并直接使用未做允许列表检查;缺少
redirect_uri参数;ID令牌接受state算法。alg: none - 种子数据、测试数据或示例中存在默认/知名密码,可能被复制到生产环境。
如需完整指导,请阅读。references/A07_2025-Authentication_Failures.md
A08:2025 — Software or Data Integrity Failures
A08:2025 — 软件或数据完整性失效
Grep targets:
- Insecure deserialization: ,
pickle\.loads\((withoutyaml\.load\(),SafeLoader,ObjectInputStream,BinaryFormatter,unserialize\(.Marshal\.load\( - Auto-update without signature verification: code that downloads + executes/installs without checksum or signature check.
- Signed cookie/token verification missing or weak: JWT decoded without ;
verifywithoutcookie-parser; HMAC compare withsigned: trueinstead of constant-time.== - CI workflows running on untrusted PRs with secrets: + checkout of PR head + access to
pull_request_target.${{ secrets.* }} - Plugin/extension loading from disk or URL without signature: ,
require(userPath),import(userModule).Assembly.LoadFrom(file) - Mutable third-party actions/images: tags, branch refs in
:latestlines.uses: - Missing SBOM/provenance artifacts in release pipeline.
For full guidance, read.references/A08_2025-Software_or_Data_Integrity_Failures.md
Grep扫描目标:
- 不安全的反序列化:、
pickle\.loads\((未使用yaml\.load\()、SafeLoader、ObjectInputStream、BinaryFormatter、unserialize\(。Marshal\.load\( - 无签名验证的自动更新:代码中存在下载并执行/安装的逻辑但未做校验和或签名检查。
- 签名Cookie/令牌验证缺失或薄弱:JWT解码时未执行;
verify未设置cookie-parser;HMAC比较使用signed: true而非恒定时长比较。== - CI工作流在不受信任的PR中运行并使用密钥:+检出PR代码+访问
pull_request_target。${{ secrets.* }} - 从磁盘或URL加载插件/扩展未做签名验证:、
require(userPath)、import(userModule)。Assembly.LoadFrom(file) - 可变的第三方Action/镜像:标签、
:latest行中使用分支引用。uses: - 发布流水线中缺少SBOM/溯源工件。
如需完整指导,请阅读。references/A08_2025-Software_or_Data_Integrity_Failures.md
A09:2025 — Security Logging and Alerting Failures
A09:2025 — 安全日志与告警失效
Static-only signals (this category requires runtime context — flag gaps but defer depth to the agent):
- No structured logger in the project (no winston/pino/bunyan, no python setup, no Serilog) — or only
loggingin server code.console.log - Auth events not logged: search /
authenticatepaths for log calls on failure.authorize - Sensitive data logged: log calls that include ,
password,token,secret,creditCard, full request body, full headers.ssn - No centralized error handler / no request-ID correlation.
- No audit trail for high-value actions (role change, payment, data export) — look for or equivalent on critical write paths.
INSERT INTO audit_log - No retention policy / no log shipping config (no ,
fluentbit,vector, no Datadog/Splunk/CloudWatch agent config).filebeat
For full guidance, read.references/A09_2025-Security_Logging_and_Alerting_Failures.md
静态信号(该类别需运行时上下文——标记缺口但深度分析交由Agent处理):
- 项目中无结构化日志工具(无winston/pino/bunyan、无Python 配置、无Serilog)——或服务器代码仅使用
logging。console.log - 认证事件未记录:查找/
authenticate路径中失败时的日志调用。authorize - 日志中包含敏感数据:日志调用包含、
password、token、secret、creditCard、完整请求体、完整请求头。ssn - 无集中式错误处理/无请求ID关联。
- 高价值操作(角色变更、支付、数据导出)无审计追踪——查找关键写入路径中的或等效操作。
INSERT INTO audit_log - 无保留策略/无日志传输配置(无、
fluentbit、vector、无Datadog/Splunk/CloudWatch代理配置)。filebeat
如需完整指导,请阅读。references/A09_2025-Security_Logging_and_Alerting_Failures.md
A10:2025 — Mishandling of Exceptional Conditions
A10:2025 — 异常条件处理不当
Grep targets:
- Silent exception swallowing: ,
catch\s*\(\s*\w*\s*\)\s*\{\s*\},except[^:]*:\s*pass,catch\s*\(_?\)\s*=>\s*\{\s*\}.try { ... } catch { /* ignore */ } - Generic catches around security calls: /
catch (Exception)wrappingexcept Exception:,authorize,verify,validatecalls.check* - Fail-open patterns: catch blocks that set a permission/role/allowed flag to or return
trueon error.true - Stack-trace responses: error middleware that sends or
err.stackto clients in non-dev mode.err.message - Unhandled async rejections: route handlers in Express 4 without
asyncor try/catch — flag anyexpress-async-errorswithout an error catcher.async (req, res) => - Transaction without rollback on error: /
BEGINwithout a matching rollback in the catch.commit - Different status codes/messages between "exists" and "not found" branches on auth-adjacent endpoints (enumeration via error).
- TOCTOU patterns: — separated check and use.
if (fs.exists) { ... fs.read }
For full guidance, read.references/A10_2025-Mishandling_of_Exceptional_Conditions.md
Grep扫描目标:
- 静默捕获异常:、
catch\s*\(\s*\w*\s*\)\s*\{\s*\}、except[^:]*:\s*pass、catch\s*\(_?\)\s*=>\s*\{\s*\}。try { ... } catch { /* ignore */ } - 安全相关调用使用通用捕获:/
catch (Exception)包裹except Exception:、authorize、verify、validate调用。check* - 故障开放模式:捕获块中将权限/角色/允许标志设为或错误时返回
true。true - 返回堆栈跟踪:错误中间件在非开发模式下向客户端返回或
err.stack。err.message - 未处理的异步拒绝:Express 4中的异步路由处理器未使用或try/catch——标记所有无错误捕获的
express-async-errors代码。async (req, res) => - 事务错误时未回滚:/
BEGIN未在捕获块中执行对应的回滚操作。commit - 认证相关端点中“存在”与“不存在”分支返回不同状态码/消息(通过错误枚举信息)。
- TOCTOU(检查时间与使用时间不一致)模式:——检查与使用操作分离。
if (fs.exists) { ... fs.read }
如需完整指导,请阅读。references/A10_2025-Mishandling_of_Exceptional_Conditions.md
Step 3 — Secret Scan
步骤3 — 密钥扫描
Walk , , , /, , , , source files. Grep patterns:
.env*config/secrets/*.yml*.yaml*.json*.tf*.properties| Secret class | Regex (anchor to ensure context) |
|---|---|
| AWS access key | |
| AWS secret key | |
| GCP service-account key | |
| GitHub PAT (classic) | |
| GitHub fine-grained PAT | |
| Slack token | |
| Stripe live key | |
| Stripe restricted | |
| Twilio account SID | |
| Generic JWT | |
| RSA / EC private key | `-----BEGIN (RSA |
| Connection string | |
| Generic high-entropy assignment | |
For each match: record file:line, redact the middle of the value in the report (), and flag whether the file is committed to git (). Committed secrets require a separate remediation note ("rotate immediately + purge history").
AKIA…REDACTED…XYZWgit log --all --diff-filter=A -- <path>Recommend or as deeper follow-ups if available.
gitleaks detect --no-bannertrufflehog filesystem .遍历、、、/、、、及源文件。Grep匹配模式:
.env*config/secrets/*.yml*.yaml*.json*.tf*.properties| 密钥类别 | 正则表达式(锚定以确保上下文) |
|---|---|
| AWS访问密钥 | |
| AWS密钥 | |
| GCP服务账号密钥 | |
| GitHub PAT(经典版) | |
| GitHub细粒度PAT | |
| Slack令牌 | |
| Stripe生产密钥 | |
| Stripe受限密钥 | |
| Twilio账号SID | |
| 通用JWT | |
| RSA/EC私钥 | `-----BEGIN (RSA |
| 连接字符串 | |
| 通用高熵赋值 | |
对于每个匹配项:记录文件:行号,在报告中对值的中间部分进行脱敏(例如),并标记该文件是否已提交至git(通过检查)。已提交的密钥需单独添加修复说明(“立即轮换密钥并清除历史记录”)。
AKIA…REDACTED…XYZWgit log --all --diff-filter=A -- <path>若条件允许,推荐使用或进行更深度的后续扫描。
gitleaks detect --no-bannertrufflehog filesystem .Step 4 — Framework-Aware Checks
步骤4 — 框架针对性检查
Only run the sub-section(s) matching the recon profile from Step 1.
仅执行与步骤1中识别的技术栈匹配的子章节。
Express / Node.js
Express / Node.js
- middleware installed and applied to the app.
helmet() - has a reasonable cap (not unlimited).
express.json({ limit: ... }) - CSRF middleware on state-changing routes (Express 5 lacks built-in CSRF — look for or a custom token check).
csurf - Cookie flags: ,
httpOnly: true,secure: true.sameSite: 'lax'|'strict' - Body parsers don't accept if
text/xmlis wired up (XXE risk).xml2js - Open redirect: without allow-list.
res.redirect(req.query.url) - Prototype pollution surface: /
_.mergeon user-controlled keys;_.setwith no schema gate.Object.assign({}, req.body)
- 已安装中间件并应用于应用。
helmet() - 设置了合理的上限(非无限制)。
express.json({ limit: ... }) - 状态变更路由配置了CSRF中间件(Express 5无内置CSRF——查找或自定义令牌检查)。
csurf - Cookie标志:、
httpOnly: true、secure: true。sameSite: 'lax'|'strict' - 若已配置,则Body解析器不接受
xml2js(XXE风险)。text/xml - 开放重定向:未配置允许列表。
res.redirect(req.query.url) - 原型污染风险:/
_.merge作用于用户可控的键;_.set未做模式校验。Object.assign({}, req.body)
Django / Flask / FastAPI
Django / Flask / FastAPI
- in prod settings.
DEBUG = False - not committed; loaded from env.
SECRET_KEY - not
ALLOWED_HOSTSin production settings.['*'] - CSRF middleware enabled; justified per use.
@csrf_exempt - includes
MIDDLEWARE,SecurityMiddleware.XFrameOptionsMiddleware - ORM /
.raw()/.extra()usage flagged..execute() - Flask /
Markupon user input.|safe - FastAPI for auth on every protected route; no
Dependsmasking failed lookups.Depends(get_user, use_cache=True) - SQLAlchemy with f-string interpolation.
text()
- 生产环境设置中。
DEBUG = False - 未提交至代码仓库;从环境变量加载。
SECRET_KEY - 生产环境设置中未设为
ALLOWED_HOSTS。['*'] - CSRF中间件已启用;的使用有合理理由。
@csrf_exempt - 包含
MIDDLEWARE、SecurityMiddleware。XFrameOptionsMiddleware - 标记ORM /
.raw()/.extra()的使用。.execute() - Flask中/
Markup作用于用户输入。|safe - FastAPI中每个受保护路由均使用进行认证;无
Depends掩盖查找失败的情况。Depends(get_user, use_cache=True) - SQLAlchemy中使用f-string插值。
text()
Spring / Java
Spring / Java
- /
@PreAuthorizeon controllers; method-security enabled.@Secured - /
WebSecurityConfigurerAdapterdoesn'tSecurityFilterChainbroad paths.permitAll() - CSRF disabled only with justification.
- Actuator endpoints () not exposed publicly.
/actuator/* - /
RestTemplateusing validated SSL contexts; noWebClient.TrustAllStrategy - Jackson polymorphic deserialization () without an allow-list (deserialization RCE surface).
@JsonTypeInfo - JNDI lookups in user-controlled strings (post-Log4Shell awareness).
- 控制器上配置了/
@PreAuthorize;方法级安全已启用。@Secured - /
WebSecurityConfigurerAdapter未对宽泛路径设置SecurityFilterChain。permitAll() - CSRF仅在有合理理由时禁用。
- Actuator端点()未公开暴露。
/actuator/* - /
RestTemplate使用已验证的SSL上下文;无WebClient。TrustAllStrategy - Jackson多态反序列化()未配置允许列表(反序列化RCE风险)。
@JsonTypeInfo - 用户可控字符串中存在JNDI查找(Log4Shell后需注意)。
Rails / Ruby
Rails / Ruby
- enabled.
protect_from_forgery - enforced — no
strong_parameterson user input.params.permit! - used; no committed
Rails.application.credentials.secrets.yml - /
evalwith user input.send - /
Open3.capture2with concatenated input.%x{} - YAML.load (not ) on user data.
safe_load
- 已启用。
protect_from_forgery - 强制使用——用户输入未使用
strong_parameters。params.permit! - 使用;未提交
Rails.application.credentials。secrets.yml - /
eval作用于用户输入。send - /
Open3.capture2使用拼接的输入。%x{} - 用户数据使用YAML.load(而非)。
safe_load
Go
Go
- has timeouts set (
http.Server,ReadTimeout,WriteTimeout) — defaults are unlimited.IdleTimeout - patterns covered by authentication middleware.
http.Handle("/", ...) - config doesn't set
crypto/tls.InsecureSkipVerify: true - SQL: or
db.Query(fmt.Sprintf(...))concatenation.+ - patterns.
exec.Command("sh", "-c", userInput) - Open redirect via .
http.Redirect
- 已设置超时(
http.Server、ReadTimeout、WriteTimeout)——默认值为无限制。IdleTimeout - 模式已被认证中间件覆盖。
http.Handle("/", ...) - 配置未设置
crypto/tls。InsecureSkipVerify: true - SQL:或
db.Query(fmt.Sprintf(...))字符串拼接。+ - 模式。
exec.Command("sh", "-c", userInput) - 通过实现开放重定向。
http.Redirect
.NET
.NET
- attribute on controllers;
[Authorize]audited.[AllowAnonymous] - Antiforgery tokens on POSTs.
- (deserialization RCE).
JsonSerializerSettings.TypeNameHandling != None - (XXE).
XmlReaderSettings.DtdProcessing != Prohibit - Connection strings in committed — should be in user secrets / Key Vault.
appsettings.json - ASP.NET Core data-protection keys persisted and protected.
- 控制器上配置了属性;
[Authorize]的使用已审计。[AllowAnonymous] - POST请求配置了防伪造令牌。
- (反序列化RCE风险)。
JsonSerializerSettings.TypeNameHandling != None - (XXE风险)。
XmlReaderSettings.DtdProcessing != Prohibit - 中提交了连接字符串——应存储在用户密钥/密钥保管库中。
appsettings.json - ASP.NET Core数据保护密钥已持久化并受保护。
PHP
PHP
- ,
eval(,assert(on input.create_function( - /
includewith user input.require - on cookies/inputs.
unserialize - File upload: to web-served directory without extension allow-list.
move_uploaded_file - patterns.
mysqli_query(... . $_GET[...])
- 、
eval(、assert(作用于输入。create_function( - /
include使用用户输入。require - 对Cookie/输入执行。
unserialize - 文件上传:将文件移动到Web服务目录且未设置扩展名允许列表。
move_uploaded_file - 模式。
mysqli_query(... . $_GET[...])
Step 5 — Report Output
步骤5 — 报告输出
Determine project root
确定项目根目录
Use if inside a repo; otherwise the working directory at scan time. Treat that path as .
git rev-parse --show-toplevel<project_root>若在git仓库内,使用;否则使用扫描时的工作目录。将该路径视为。
git rev-parse --show-toplevel<project_root>Choose the report path (ISO date; collision-safe)
选择报告路径(ISO日期;避免冲突)
bash
DATE=$(date +%Y-%m-%d)
DIR="<project_root>/audit/${DATE}"
mkdir -p "$DIR"
FILE="${DIR}/report.md"
if [ -e "$FILE" ]; then
TIME=$(date +%H%M%S)
FILE="${DIR}/report-${TIME}.md"
fiWindows / PowerShell equivalent:
powershell
$date = Get-Date -Format 'yyyy-MM-dd'
$dir = Join-Path $projectRoot "audit\$date"
New-Item -ItemType Directory -Force -Path $dir | Out-Null
$file = Join-Path $dir 'report.md'
if (Test-Path $file) {
$time = Get-Date -Format 'HHmmss'
$file = Join-Path $dir "report-$time.md"
}The first scan of the day writes ; subsequent scans the same day write . History is preserved; nothing is overwritten.
report.mdreport-HHMMSS.mdbash
DATE=$(date +%Y-%m-%d)
DIR="<project_root>/audit/${DATE}"
mkdir -p "$DIR"
FILE="${DIR}/report.md"
if [ -e "$FILE" ]; then
TIME=$(date +%H%M%S)
FILE="${DIR}/report-${TIME}.md"
fiWindows / PowerShell等效命令:
powershell
$date = Get-Date -Format 'yyyy-MM-dd'
$dir = Join-Path $projectRoot "audit\$date"
New-Item -ItemType Directory -Force -Path $dir | Out-Null
$file = Join-Path $dir 'report.md'
if (Test-Path $file) {
$time = Get-Date -Format 'HHmmss'
$file = Join-Path $dir "report-$time.md"
}当日首次扫描生成;当日后续扫描生成。保留历史记录;不覆盖任何文件。
report.mdreport-HHMMSS.mdReport structure
报告结构
Write via the tool with this exact skeleton:
Writemarkdown
undefined使用Write工具按照以下固定框架编写:
markdown
undefinedSecurity Assessment — <project name> — <YYYY-MM-DD>
安全评估报告 — <项目名称> — <YYYY-MM-DD>
Summary
摘要
- Overall risk: Critical | High | Medium | Low
- Scan time: <timestamp>
- Stack: <languages, frameworks, runtimes from Step 1>
- Attack surface: <public endpoints, authn surface, data classes>
- Components reviewed: <directories / files in scope>
- Findings: N Critical / N High / N Medium / N Low
- 整体风险等级: 严重 | 高 | 中 | 低
- 扫描时间: <时间戳>
- 技术栈: <步骤1中识别的语言、框架、运行时>
- 攻击面: <公开端点、认证面、数据类别>
- 审查范围: <涉及的目录/文件>
- 问题统计: N个严重 / N个高 / N个中 / N个低风险问题
Findings
问题详情
Critical
严重风险
SEC-001 — <short title>
SEC-001 — <简短标题>
- OWASP: A0X:2025 <Category>
- CWE: CWE-NNN
- Location:
path/to/file.ts:42 - Description: <what the issue is, in plain language>
- Attack scenario: <how an attacker exploits this in practice>
- Remediation: <how to fix; include a code-level diff sketch when possible>
- References:
references/A0X_2025-<Title>.md
- OWASP类别: A0X:2025 <类别名称>
- CWE编号: CWE-NNN
- 位置:
path/to/file.ts:42 - 描述: <用通俗语言说明问题>
- 攻击场景: <攻击者实际利用该问题的方式>
- 修复方案: <修复方法;尽可能提供代码级差异示例>
- 参考文档:
references/A0X_2025-<Title>.md
High
高风险
Medium
中风险
Low
低风险
Prioritized Remediation
优先修复建议
- <Critical-1 — one-line action>
- <Critical-2 — one-line action>
- <High-1 — one-line action> …
- <严重风险1 — 单行操作说明>
- <严重风险2 — 单行操作说明>
- <高风险1 — 单行操作说明> …
Recommended Follow-ups
后续推荐动作
- Deep manual review: spawn the agent on the top N findings for adversarial validation.
@security-auditor - Secret scanning: run and
gitleaks detect --no-bannerto confirm Step 3 coverage.trufflehog filesystem . - Dependency CVEs: run the language-appropriate auditor (,
npm audit,pip-audit,cargo audit, …) — re-include in CI if not already.govulncheck - Container scan: or
trivy fs .for OS-package + dependency CVEs in built images.grype dir:. - DAST: schedule an OWASP ZAP / Burp scan against a staging deployment.
undefined- 深度人工审查: 针对前N个高风险问题调用Agent进行对抗性验证。
@security-auditor - 密钥扫描: 运行和
gitleaks detect --no-banner确认步骤3的覆盖范围。trufflehog filesystem . - 依赖CVE检查: 运行对应语言的审计工具(、
npm audit、pip-audit、cargo audit等)——若尚未集成到CI中则添加。govulncheck - 容器扫描: 使用或
trivy fs .扫描构建镜像中的OS包+依赖CVE。grype dir:. - DAST扫描: 安排OWASP ZAP / Burp对 staging 环境进行动态应用安全测试。
undefinedSeverity rubric
风险等级判定标准
Apply consistently — these are the only allowed labels.
- Critical — unauthenticated remote code execution, public exfiltration of secrets/PII at scale, privilege escalation to admin from anonymous, complete authentication bypass.
- High — authenticated RCE, IDOR exposing other users' sensitive data, missing auth on sensitive endpoints, hard-coded credentials in a committed file, weak password hashing in production code.
- Medium — XSS in non-admin contexts, CSRF on state-changing endpoints, missing security headers, weak TLS configuration, dependency CVEs with known PoCs but limited blast radius.
- Low — verbose error pages, missing rate limits without immediate abuse path, defense-in-depth gaps, missing audit logging on non-critical actions.
需统一应用以下标签:
- 严重 — 未认证远程代码执行、大规模公开泄露密钥/PII、匿名用户提权至管理员、完全绕过认证。
- 高 — 已认证远程代码执行、IDOR暴露其他用户敏感数据、敏感端点缺失认证、已提交文件中存在硬编码凭证、生产代码中使用弱密码哈希。
- 中 — 非管理员上下文XSS、状态变更端点CSRF、缺少安全头、弱TLS配置、已知PoC但影响范围有限的依赖CVE。
- 低 — 详细错误页面、无即时滥用路径的速率限制缺失、纵深防御缺口、非关键操作缺少审计日志。
After writing
报告生成后操作
- Echo the absolute path of the report file back to the user in chat.
- Surface the top 3 highest-severity findings as a one-line preview each.
- Suggest the user add to
audit/if they don't want reports tracked in git. Do not modify.gitignore— surface the suggestion only..gitignore
- 在聊天中向用户返回报告文件的绝对路径。
- 展示前3个最高风险问题的单行预览。
- 建议用户若不想将报告纳入git追踪,可将添加到
audit/中。不得修改.gitignore— 仅提供建议。.gitignore
Relationship with @security-auditor
Agent
@security-auditor与@security-auditor
Agent的关系
@security-auditorThis skill produces a fast, broad, automatic first pass. The agent produces a deep, adversarial, manual review of specific surfaces.
@security-auditor- Use this skill for: every PR review, periodic full-repo sweeps, "is there anything obvious," initial onboarding to an unfamiliar codebase.
- Escalate to when: a Critical/High finding needs validation; a sensitive surface (auth, payment, crypto, multi-tenant data) needs design-level review; the codebase touches a regulated domain (HIPAA, PCI, GDPR).
@security-auditor
The recommended workflow: run this skill → user picks the 3–5 highest-impact findings → spawn to drill in.
@security-auditor本技能提供快速、全面、自动化的初步扫描。Agent提供深度、对抗性、人工的特定场景审查。
@security-auditor- 使用本技能的场景:每次PR审查、定期全仓库扫描、“是否存在明显问题”、首次接触陌生代码库。
- 升级至****的场景:严重/高风险问题需要验证;敏感场景(认证、支付、加密、多租户数据)需要设计级审查;代码库涉及受监管领域(HIPAA、PCI、GDPR)。
@security-auditor
推荐工作流:运行本技能 → 用户选择3-5个最高影响的问题 → 调用进行深入分析。
@security-auditorSandboxing Compatibility
沙箱兼容性
- Step 0 clone requires network + exec — skip in a strict sandbox; ask the user to clone manually or run outside the sandbox.
- Dependency auditors (,
npm audit,pip-audit,cargo audit,govulncheck, …) require network and/or subprocess. If a call fails with permission or network error, mark the section as "Skipped — sandbox" in the report and continue with static analysis only.trivy - Static checks (Step 1–5) are pure file reads + greps; they work in any sandbox.
- 步骤0克隆需要网络+执行权限——严格沙箱环境中跳过;请用户手动克隆或在沙箱外运行。
- 依赖审计工具(、
npm audit、pip-audit、cargo audit、govulncheck等)需要网络和/或子进程权限。若调用因权限或网络错误失败,在报告中标记该章节为“已跳过 — 沙箱环境”并继续执行静态分析。trivy - **静态检查(步骤1-5)**仅涉及文件读取+grep;可在任意沙箱环境中运行。
Best Practices
最佳实践
- Be conservative on severity. When in doubt, mark Medium and let the human re-rank. Inflated criticals destroy trust.
- One finding per issue. Don't bundle "weak crypto in ,
auth.ts:10,auth.ts:42" into one item — they're separate finds with separate fixes.auth.ts:88 - Cite file:line in every finding. No exceptions. A finding without a location is unactionable.
- Don't propose code edits in the report body. The report is read-only context; the user/agent applies fixes deliberately afterward.
- No false-positive bait. If a grep hit is in a test file mocking the unsafe pattern intentionally, omit it (or mark Low with "test file — informational only").
- Re-fetch references on demand. When triaging a specific A0X finding, read the matching to ground the remediation language in OWASP terms.
references/A0X_2025-*.md
- 风险等级判定保守。如有疑问,标记为中风险并交由人工重新定级。夸大严重风险会破坏信任。
- 一个问题对应一条记录。不要将“、
auth.ts:10、auth.ts:42中存在弱加密”合并为一条记录——它们是独立问题,需要单独修复。auth.ts:88 - 每条记录必须标注文件:行号。无例外。无位置信息的问题无法处理。
- 报告主体中不建议代码编辑。报告为只读上下文;用户/Agent会在之后刻意应用修复。
- 避免误报。若grep命中的是测试文件中故意模拟的不安全模式,可忽略(或标记为低风险并注明“测试文件 — 仅作信息参考”)。
- 按需获取参考文档。分类排查特定A0X问题时,阅读对应的文档,确保修复语言符合OWASP术语。
references/A0X_2025-*.md
Related Tools
相关工具
- agent — deep, manual security review of specific surfaces.
@security-auditor - /
gitleaks— secret-scanning beyond the regexes in Step 3.trufflehog - /
semgrep— pattern-based static analysis with curated rule packs.CodeQL - /
trivy/grype— vulnerability scanners for dependencies and container images.osv-scanner - OWASP ZAP / Burp Suite — DAST against a running staging environment.
- ****Agent — 特定场景的深度人工安全审查。
@security-auditor - /
gitleaks— 超出步骤3正则范围的密钥扫描工具。trufflehog - /
semgrep— 基于模式的静态分析工具,带有 curated 规则包。CodeQL - /
trivy/grype— 依赖项和容器镜像漏洞扫描工具。osv-scanner - OWASP ZAP / Burp Suite — 针对运行中staging环境的DAST工具。