Loading...
Loading...
Compare original and translation side by side
../codeprobe/shared-preamble.md../codeprobe/references/full../codeprobe/shared-preamble.md../codeprobe/references/full.env.exampledocker-compose.dev.ymltests/fixtures/npm auditcomposer audit.env.exampledocker-compose.dev.ymltests/fixtures/npm auditcomposer audit| ID Prefix | What to Detect | How to Detect | Severity |
|---|---|---|---|
| Raw SQL with string concatenation/interpolation | Search for SQL keywords ( | Critical |
| | Search for | Critical |
| Shell command construction with unsanitized input | Search for | Critical |
| LDAP/NoSQL injection vectors | Search for LDAP filter construction with string concatenation, MongoDB query construction with user input in | Critical |
| ID前缀 | 检测内容 | 检测方式 | 严重程度 |
|---|---|---|---|
| 带有字符串拼接/插值的原生SQL | 搜索SQL关键字( | 严重 |
| 包含用户输入的 | 搜索 | 严重 |
| 使用未净化输入构造Shell命令 | 搜索 | 严重 |
| LDAP/NoSQL注入向量 | 搜索带有字符串拼接的LDAP过滤器构造、在 | 严重 |
| ID Prefix | What to Detect | How to Detect | Severity |
|---|---|---|---|
| Missing auth middleware on routes that modify data | Scan route definitions (e.g., | Critical |
| Role checks done in view/frontend but not backend | Search for role/permission checks in frontend templates or JavaScript (e.g., | Major |
| Hardcoded secrets/API keys in source code | Search for patterns: | Critical |
| Weak password policy | Look for user registration/password-change logic. Check whether password validation enforces minimum length (8+ chars), complexity, or uses a validation library. Flag if passwords are accepted without any validation rules. | Major |
| JWT without expiration | Search for JWT creation/signing code. Check whether the payload includes an | Major |
| ID前缀 | 检测内容 | 检测方式 | 严重程度 |
|---|---|---|---|
| 修改数据的路由缺失认证中间件 | 扫描路由定义(如 | 严重 |
| 仅在视图/前端进行角色检查而未在后端执行 | 搜索前端模板或JavaScript中的角色/权限检查(如 | 主要 |
| 源代码中的硬编码密钥/API密钥 | 搜索以下模式: | 严重 |
| 弱密码策略 | 查找用户注册/密码修改逻辑。检查密码验证是否强制要求最小长度(8个字符以上)、复杂度,或是否使用了验证库。如果密码未经过任何验证规则就被接受,则进行标记。 | 主要 |
| 无过期时间的JWT | 搜索JWT创建/签名代码。检查载荷是否包含 | 主要 |
| ID Prefix | What to Detect | How to Detect | Severity |
|---|---|---|---|
| | Search for | Major |
| | Search for | Major |
| | Search for | Major |
| Missing Content-Security-Policy | Check for CSP headers in middleware, web server config, or meta tags. If no CSP is configured anywhere in the project, flag as a defense-in-depth gap. | Minor |
| ID前缀 | 检测内容 | 检测方式 | 严重程度 |
|---|---|---|---|
| Laravel Blade中包含用户数据的 | 在 | 主要 |
| React中使用不可信数据的 | 在 | 主要 |
| Vue中使用不可信数据的 | 在 | 主要 |
| 缺失内容安全策略(CSP) | 检查中间件、Web服务器配置或元标签中的CSP头。如果项目中未配置任何CSP,则标记为深度防御缺口。 | 次要 |
| ID Prefix | What to Detect | How to Detect | Severity |
|---|---|---|---|
| Laravel model without | Search for Eloquent model classes (extending | Major |
| Accepting | Search for | Critical |
| ID前缀 | 检测内容 | 检测方式 | 严重程度 |
|---|---|---|---|
| 未设置 | 搜索Eloquent模型类(继承自 | 主要 |
| 将 | 搜索 | 严重 |
| ID Prefix | What to Detect | How to Detect | Severity |
|---|---|---|---|
| Forms without CSRF tokens | Search for | Major |
| API routes without proper auth that modify state | Check API routes (POST/PUT/PATCH/DELETE) that lack both CSRF protection AND authentication middleware. Stateless APIs with token auth are fine; session-based APIs without CSRF tokens are not. | Major |
| ID前缀 | 检测内容 | 检测方式 | 严重程度 |
|---|---|---|---|
| 缺失CSRF令牌的表单 | 搜索带有 | 主要 |
| 修改状态且未正确认证的API路由 | 检查既无CSRF保护又无认证中间件的API路由(POST/PUT/PATCH/DELETE)。使用令牌认证的无状态API是安全的;基于会话且无CSRF令牌的API则不安全。 | 主要 |
| ID Prefix | What to Detect | How to Detect | Severity |
|---|---|---|---|
| | Search for | Critical |
| | Search for | Major |
| ID前缀 | 检测内容 | 检测方式 | 严重程度 |
|---|---|---|---|
| 对用户输入执行 | 搜索 | 严重 |
| 在类eval上下文中使用未验证的 | 搜索对外部数据执行 | 主要 |
| ID Prefix | What to Detect | How to Detect | Severity |
|---|---|---|---|
| Passwords/tokens in log statements | Search for logging calls ( | Critical |
| | Check whether | Critical |
| Secrets in config files vs environment variables | Search config files for hardcoded credentials, API keys, database passwords. Flag values that should come from environment variables but are instead hardcoded in tracked config files. | Major |
| Error messages leaking stack traces in production config | Check error/exception handling configuration. Look for | Major |
| ID前缀 | 检测内容 | 检测方式 | 严重程度 |
|---|---|---|---|
| 日志语句中的密码/令牌 | 搜索日志调用( | 严重 |
| .env文件已提交至git | 检查 | 严重 |
| 配置文件中的密钥而非环境变量 | 搜索配置文件中的硬编码凭据、API密钥、数据库密码。标记应来自环境变量但却硬编码在已追踪配置文件中的值。 | 主要 |
| 生产配置中泄露堆栈跟踪的错误信息 | 检查错误/异常处理配置。查找 | 主要 |
| ID Prefix | What to Detect | How to Detect | Severity |
|---|---|---|---|
| IDOR — using user-supplied ID without ownership check | Search for route parameters or request params (e.g., | Critical |
| Missing policy/gate checks on resource access | In frameworks with authorization systems (Laravel policies, Django permissions, Express middleware), check whether CRUD operations on user-owned resources include authorization checks. Flag controller actions that read/modify resources without policy or permission verification. | Major |
| ID前缀 | 检测内容 | 检测方式 | 严重程度 |
|---|---|---|---|
| IDOR——使用用户提供的ID但未检查所有权 | 搜索路由参数或请求参数(如 | 严重 |
| 资源访问缺失策略/网关检查 | 在带有授权系统的框架(Laravel策略、Django权限、Express中间件)中,检查用户拥有资源的CRUD操作是否包含授权检查。标记未经过策略或权限验证就读取/修改资源的控制器操作。 | 主要 |
| ID Prefix | What to Detect | How to Detect | Severity |
|---|---|---|---|
| | Search for | Major |
| Permissive CORS | Search for CORS configuration. Flag | Major |
| Default credentials in configuration | Search for usernames like | Critical |
| ID前缀 | 检测内容 | 检测方式 | 严重程度 |
|---|---|---|---|
| 生产配置中 | 在看似生产配置的文件(非 | 主要 |
| 宽松的CORS设置 | 搜索CORS配置。在非公开API场景中,标记 | 主要 |
| 配置中的默认凭据 | 在配置文件、种子文件或初始化代码中搜索用户名如 | 严重 |
SEC-SEC-001SEC-002SEC-SEC-001SEC-002UserController@update$request->all()$request->only(['name', 'email'])is_admin$fillable = ['name', 'email']Userapp/Services/SearchService.phpDB::select(\"SELECT * FROM products WHERE name LIKE '%$search%'\")DB::select('SELECT * FROM products WHERE name LIKE ?', [\"%{$search}%\"])routes/api.phpPOST /api/ordersRoute::post('/orders', [OrderController::class, 'store'])Route::post('/orders', [OrderController::class, 'store'])->middleware('auth:sanctum')config/services.php'key' => 'sk-live-abc123...''key' => env('STRIPE_SECRET_KEY')STRIPE_SECRET_KEY=.env.exampleUserController@update$request->all()$request->only(['name', 'email'])is_adminUser$fillable = ['name', 'email']app/Services/SearchService.phpDB::select(\"SELECT * FROM products WHERE name LIKE '%$search%'\")DB::select('SELECT * FROM products WHERE name LIKE ?', [\"%{$search}%\"])routes/api.phpPOST /api/ordersRoute::post('/orders', [OrderController::class, 'store'])Route::post('/orders', [OrderController::class, 'store'])->middleware('auth:sanctum')config/services.php'key' => 'sk-live-abc123...''key' => env('STRIPE_SECRET_KEY').env.exampleSTRIPE_SECRET_KEY=