Github Com Shieldfy API Security Checklist
Github Com Shieldfy API Security Checklist
Sign in Sign up
Activity
README-cs.md Sync. 5 months ago
21.4k stars
README-de.md Sync. 5 months ago
540 watching
README-el.md Sync. 5 months ago 2.6k forks
No releases published
README-hi.md Sync. 5 months ago
Packages
README-it.md Sync. 5 months ago
No packages published
README-ja.md Fix mixed forms in ja 2 months ago
+3
README-mk.md Sync. 5 months ago
README.md Update the Lao language link's text. Make it more understandable. 5 months ago
README.md
繁中版 | 简中版 | | العربيةবাংলা | Čeština | Deutsch | Ελληνικά | Español | | فارسیFrançais | हिंदी | Indonesia |
Italiano | 日本語 | 한국어 | ພາສາລາວ | Македонски | മലയാളം | Монгол | Nederlands | Polski | Português
(Brasil) | Русский | ไทย | Türkçe | Українська | Tiếng Việt
Authentication
Don't use Basic Auth . Use standard authentication instead (e.g., JWT).
Don't reinvent the wheel in Authentication , token generation , password storage . Use the standards.
Use Max Retry and jail features in Login.
Use encryption on all sensitive data.
Access
Authorization
OAuth
Always validate redirect_uri server-side to allow only safelisted URLs.
Always try to exchange for code and not tokens (don't allow response_type=token ).
Use state parameter with a random hash to prevent CSRF on the OAuth authorization process.
Define the default scope, and validate scope parameters for each application.
Input
Use the proper HTTP method according to the operation: GET (read) , POST (create) , PUT/PATCH
(replace/update) , and DELETE (to delete a record) , and respond with 405 Method Not Allowed if the
requested method isn't appropriate for the requested resource.
Validate content-type on request Accept header (Content Negotiation) to allow only your supported
format (e.g., application/xml , application/json , etc.) and respond with 406 Not Acceptable response
if not matched.
Validate content-type of posted data as you accept (e.g., application/x-www-form-urlencoded ,
multipart/form-data , application/json , etc.).
Validate user input to avoid common vulnerabilities (e.g., XSS , SQL-Injection , Remote Code Execution ,
etc.).
Don't use any sensitive data ( credentials , Passwords , security tokens , or API keys ) in the URL, but
use standard Authorization header.
Use only server-side encryption.
Use an API Gateway service to enable caching, Rate Limit policies (e.g., Quota , Spike Arrest , or
Concurrent Rate Limit ) and deploy APIs resources dynamically.
Processing
Check if all the endpoints are protected behind authentication to avoid broken authentication process.
User own resource ID should be avoided. Use /me/orders instead of /user/654321/orders .
Don't auto-increment IDs. Use UUID instead.
If you are parsing XML data, make sure entity parsing is not enabled to avoid XXE (XML external entity
attack).
If you are parsing XML, YAML or any other language with anchors and refs, make sure entity expansion is
not enabled to avoid Billion Laughs/XML bomb via exponential entity expansion attack.
Use a CDN for file uploads.
If you are dealing with huge amount of data, use Workers and Queues to process as much as possible in
background and return response fast to avoid HTTP Blocking.
Do not forget to turn the DEBUG mode OFF.
Use non-executable stacks when available.
Output
CI & CD
Monitoring
See also:
Contribution
Feel free to contribute by forking this repository, making some changes, and submitting pull requests. For any
questions drop us an email at [email protected] .
© 2023 GitHub, Inc. Terms Privacy Security Status Docs Contact GitHub Pricing API Training Blog About