← 返回
未分类 中文

Missing Input Validation

External input flows into sensitive operations without being checked for type, shape, range, or sanitization.
外部输入未检查类型、形状、范围或消毒即流向敏感操作。
mvogt99 mvogt99 来源
未分类 clawhub v1.0.0 1 版本 100000 Key: 无需
★ 0
Stars
📥 284
下载
💾 1
安装
1
版本
#latest

概述

missing-input-validation

Any data from outside the process — HTTP request bodies, CLI args, file contents, third-party API responses, user messages — should be treated as untrusted until proven otherwise. Code that uses it directly opens injection, crash, and security paths.

Symptoms

  • HTTP handler uses request.body.x with no type check.
  • CLI flag value passed straight into exec, SQL, or a file path.
  • Third-party API response fields accessed without confirming they exist.
  • Numeric input used in array indexing or arithmetic with no bounds check.
  • String input concatenated into SQL, shell commands, or file paths.

What to do

  • At every trust boundary, validate type, shape, and range before using the value. Reject early with a clear error message.
  • For structured payloads, use a schema validator (Zod, Pydantic, ArkType, etc.) — don't hand-write "if field exists".
  • For values used in SQL, shell, or file paths, use parameterized queries, execFile with an argv array, or explicit path joins — never string concatenation.
  • When an invariant is checked, include the unexpected value in the error so debugging is possible.
  • Third-party responses are not trustworthy. Validate them the same way you'd validate user input.

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-05-08 01:51 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

it-ops-security

1password

steipete
设置和使用 1Password CLI (op)。适用于:安装 CLI、启用桌面应用集成、登录(单/多账户)、通过 op 读取/注入/运行密钥。
★ 53 📥 31,956
it-ops-security

MoltGuard - Security & Antivirus & Guardrails

thomaslwang
MoltGuard — OpenClaw 安全守卫,由 OpenGuardrails 提供。安装后可防止您和您的用户受到提示注入、数据泄露及恶意行为的侵害。
★ 116 📥 31,042
it-ops-security

Free Ride - Unlimited free AI

shaivpidadi
管理OpenClaw的OpenRouter免费AI模型,自动按质量排名模型,配置速率限制备用方案,并更新opencla...
★ 472 📥 78,757