# Improper Access Control (CWE-284) The product does not restrict or incorrectly restricts access to a resource from an unauthorized actor. **Stack:** Go - Prevalence: Alta Frequentemente explorada - Impact: Alto 3 regras de severidade alta - Prevention: Documentada 4 exemplos de correção **OWASP:** Broken Access Control (A01:2021-Broken Access Control) - #1 ## Description Access control involves determining which subjects can access which objects. When access control is implemented incorrectly, it can lead to unauthorized access to sensitive data or functionality. ## Prevention Estratégias de prevenção para Improper Access Control baseadas em 1 regras de detecção do Shoulder. ### Go Validate tool inputs against strict schemas and use an allowlist for permitted tools ## Warning Signs - [HIGH] Insecure plugin implementation: ... - [HIGH] insecure plugin/function calling implementations in AI/LLM systems without proper validation ## Consequences - Ler dados da aplicação - Modificar dados da aplicação - Executar código não autorizado - Obter privilégios ## Mitigations - Implemente verificações adequadas de controle de acesso em todos os recursos - Use o princípio do menor privilégio - Aplique controles de acesso no servidor, e não apenas na UI ## Detection - Total rules: 4 - Languages: go, javascript, typescript, kubernetes, yaml, python ## Rules by Language ### Go (1 rules) - **LLM Insecure Plugin Design** [HIGH]: Detects insecure plugin/function calling implementations in AI/LLM systems without proper validation. - Remediation: Validate tool inputs against strict schemas and use an allowlist for permitted tools. ```go if _, ok := toolRegistry[toolCall.Name]; !ok { return errors.New("unknown tool") } ``` Learn more: https://shoulder.dev/learn/go/cwe-284/llm-insecure-plugin