Missing Authorization
The product does not perform an authorization check when an actor attempts to access a resource or perform an action.
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.
So behebst du diese Schwachstelle
Präventionsstrategien für Missing Authorization basierend auf 3 Shoulder-Erkennungsregeln.
Require human approval for sensitive operations and limit agent loop iterations
- for _, toolCall := range resp.Choices[0].Message.ToolCalls { + var sensitiveOps = map[string]bool{ + "deleteUser": true, "transferFunds": true, "sendEmail": true, + } + + for i, toolCall := range resp.Choices[0].Message.ToolCalls { + if i >= maxIterations { + break + } + if sensitiveOps[toolCall.Function.Name] { + queueForApproval(toolCall) + continue + } result, _ := tools[toolCall.Function.Name](toolCall.Function.Arguments) results = append(results, result) }
Finden Sie Schwachstellen in Ihrem Code
Verwenden Sie Shoulder, um Ihren Code nach Missing Authorization-Mustern zu scannen. 3 Regeln.
# Scan with Shoulder CLI npx @shoulderdev/cli trust --cwe=862 # Or scan entire project npx @shoulderdev/cli trust .
Erkennungsregeln (3)
Worauf bei Code-Reviews zu achten ist
Diese Muster weisen auf potenzielle Missing Authorization-Schwachstellen hin. Achten Sie bei Code-Reviews und Sicherheitsaudits darauf.
Scanne deine Codebasis nach Missing Authorization
Shoulder CLI findet anfällige Muster in deiner gesamten Codebasis.