You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+12-5Lines changed: 12 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -84,6 +84,7 @@ Our detailed explainations should help the first type while we hope our checklis
84
84
-[ ] Must have the `state` parameter in OAuth2
85
85
-[ ] No open redirects after successful login or in any other intermediate redirects.
86
86
-[ ] While Signup/Login input, sanitize input for javascript://, data://, CRLF characters.
87
+
-[ ] Set secure, httpOnly cookies.
87
88
-[ ] In Mobile `OTP` based mobile verification, do not send the OTP back in the response when `generate OTP` or `Resend OTP` API is called.
88
89
-[ ] Limit attempts to `Login`, `Verify OTP`, `Resend OTP` and `generate OTP` APIs for a particular user. Have an exponential backoff set or/and something like a captcha based challenge.
89
90
-[ ] Check for randomness of reset password token in the emailed link or SMS
@@ -99,7 +100,7 @@ Our detailed explainations should help the first type while we hope our checklis
99
100
-[ ] Any upload feature should sanitize the filename provided by the user. Also, for generally reasons apart from security, upload to something like S3 (and post-process using lambda) and not your own server capable of executing code.
100
101
-[ ]`Profile photo upload` feature should sanitize all the `EXIF` tags also if not required.
101
102
-[ ] For user ids and other ids, use [RFC complaint ](http://www.ietf.org/rfc/rfc4122.txt)`UUID` instead of integers. You can find an implementation for this for your language on Github.
102
-
-[ ] JWT are awesome, use them if required for your APIs.
103
+
-[ ] JWT are awesome, use them if required for your single page app/APIs.
103
104
104
105
105
106
##### ANDRIOD / IOS APP
@@ -118,11 +119,16 @@ Our detailed explainations should help the first type while we hope our checklis
118
119
-[ ]`Add`[X-XSS-Protection](https://www.owasp.org/index.php/OWASP_Secure_Headers_Project#X-XSS-Protection) header to mitigate XSS attacks.
119
120
-[ ] Update DNS records to add [SPF](https://en.wikipedia.org/wiki/Sender_Policy_Framework) record to mitigate spam and phishing attacks.
120
121
-[ ] Add [subresource integrity checks](https://en.wikipedia.org/wiki/Subresource_Integrity) if loading your JavaScript libraries from a third party CDN.
122
+
-[ ] Use random CSRF tokens and expose buisness logic APIs as HTTP POST requests. Do not expose CSRF tokens over HTTP for example in a inital request upgrade phase.
123
+
-[ ] Do not use critical data or tokens in GET request parameters. Exposure of server logs or a machine/stack processing them would expose user data in turn.
121
124
122
125
##### SANITIZATION OF INPUT
123
-
-[ ]`Sanitize` all user inputs to prevent [XSS](https://en.wikipedia.org/wiki/Cross-site_scripting)
124
-
-[ ]`Sanitize` all user inputs to prevent [SQL Injection](https://en.wikipedia.org/wiki/SQL_injection)
125
-
-[ ] Sanitize Outputs before displaying to users ?
126
+
-[ ]`Sanitize` all user inputs or any input parameters exposed to user to prevent [XSS](https://en.wikipedia.org/wiki/Cross-site_scripting)
127
+
-[ ]`Sanitize` all user inputs or any input parameters exposed to user to prevent [SQL Injection](https://en.wikipedia.org/wiki/SQL_injection)
128
+
-[ ] Sanitize user input if using it directly for functionalites like CSV import.
129
+
-[ ]`Sanitize` user input for special cases like robots.txt as profile names in case you are using a url pattern like coolcorp.io/username.
130
+
-[ ] Do not hand code or build JSON by string concatentation ever, no matter how small the object is. Use your langauge defined libraries or framework.
131
+
-[ ] Sanitize Outputs before displaying to users.
126
132
127
133
##### OPERATIONS
128
134
-[ ] If you are small and inexperienced, evaluate using AWS elasticbeanstalk or a PaaS to run your code.
@@ -131,7 +137,8 @@ Our detailed explainations should help the first type while we hope our checklis
131
137
-[ ] Check for no/default passwords for `databases` especially MongoDB & Redis. BTW MongoDB sucks, avoid it.
132
138
-[ ] Use SSH to access your machines, do no setup a password.
133
139
-[ ] Install updates timely to act upon zero day vulnerabilities like Heartbleed, Shellshock.
134
-
-[ ] Modify server config to use TLS 1.2 for HTTPS and disable all other schemes.
140
+
-[ ] Modify server config to use TLS 1.2 for HTTPS and disable all other schemes. (The tradeoff is good)
141
+
-[ ] Do not leave the DEBUG mode on. In some frameworks, DEBUG mode can give access full-fledged REPL or shells or expose critical data in error messages stacktraces.
135
142
-[ ] Be prepared for bad actors & DDOS - use [Cloudflare](https://www.cloudflare.com/ddos/)
136
143
-[ ] Setup monitoring for your systems and log stuff (use Newrelic or something like that)
137
144
-[ ] If developing for enterprise customers, adhere to compliance requirements. If AWS S3, consider using the feature to [encrypt data](http://docs.aws.amazon.com/AmazonS3/latest/dev/UsingServerSideEncryption.html). If using AWS EC2, consider using the feature to use encrypted volumes (even boot volumes can be encypted now).
0 commit comments