-
-
Notifications
You must be signed in to change notification settings - Fork 394
Change "how to prevent" tips #25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
We can't ask developers to define and enforce all data returned by all API methods. It's like asking "Implement input validation on every single input on the system" - for many companies it won't be a feasible solution. As security engineers who provide recommendations for the broad community, we should always keep in mind the trade off between security and the available resources of the company that uses OWASP to improve the security posture.We should always assume that companies have limited resources. With this mindset, OWASP has been provided recommendations for many years. Recommendations like "Explicitly define and enforce data returned by all API methods including errors: give all JSON objects schemas, all string objects patterns, use clear field names." don't align with this mindset. The second part of the last recommendation already appears in the second recommendation.
Authorization mechanisms (not exploitation of mass assignment) that rely on "is_admin = true" are extremely not common in APIs. You could find them many years ago, and maybe today in WebGoats and CTF machines.
"* To prevent data leaks, define and enforce schemas for all API responses" sounds like a marketing message. Let's keep the list professional without any agenda.
The right way to avoid detailed errors is to use built-in features in the framework to override detailed errors. API schemas are another layer of protection. Not a solution for the problem.
"* For sensitive operations such as login or password reset, consider rate limits by API method (e.g., authentication), client (e.g., IP address), property (e.g., username)." is related to A2, not A4. "* If your API accepts compressed files check compression ratios before expanding the files to protect yourself against "zip bombs"." - very niche example, I don't think it has a place in the list.
PauloASilva
reviewed
Dec 16, 2019
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please review my comments on suggested changes?
This PR was merged into |
PauloASilva
pushed a commit
that referenced
this pull request
Jan 22, 2021
Update 0xd0-about-data.md
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.