# Missing Authorization (CWE-862) The product does not perform an authorization check when an actor attempts to access a resource or perform an action. **Stack:** Go - Prevalence: 高 频繁被利用 - Impact: 高 3 条严重级别为高的规则 - Prevention: 已记录 3 个修复示例 **OWASP:** Broken Access Control (A01:2021-Broken Access Control) - #1 ## Description Assuming a user with a given identity, authorization is the process of determining whether that user can access a given resource. When authorization checks are completely missing, any authenticated user can access protected resources. ## Prevention 基于 1 条 Shoulder 检测规则的 Missing Authorization 预防策略。 ### Go Require human approval for sensitive operations and limit agent loop iterations ## Warning Signs - [HIGH] Excessive LLM agency detected: ... - [HIGH] LLM implementations with excessive autonomy allowing destructive operations without human approval ## Consequences - 读取应用程序数据 - 修改应用程序数据 - 获取权限 ## Mitigations - 对所有受保护资源实施授权检查 - 使用集中式的授权机制 - 遵循默认拒绝(deny by default)的原则 ## Detection - Total rules: 3 - Languages: go, javascript, typescript, python ## Rules by Language ### Go (1 rules) - **LLM Excessive Agency** [HIGH]: Detects LLM implementations with excessive autonomy allowing destructive operations without human approval. - Remediation: Require human approval for sensitive operations and add iteration limits. ```go if sensitiveOperations[toolName] { queueForApproval(toolCall) } ``` Learn more: https://shoulder.dev/learn/go/cwe-862/llm-excessive-agency