|
| 1 | +“Secure-by-Default” means products are resilient against prevalent exploitation techniques out of the box |
| 2 | +without additional charge. Software should start in a secure state without requiring extensive user configuration, |
| 3 | +ensuring the default settings are always the most secure option. |
| 4 | + |
| 5 | +Refer to proactive control [C5: Secure By Default Configurations][control5] and the |
| 6 | +[Infrastructure as Code Security Cheatsheet][csproactive-c5] |
| 7 | +for more context from the OWASP Top 10 Proactive Controls project, |
| 8 | +and use the lists below as suggestions for a checklist that has been tailored for the individual project. |
| 9 | + |
| 10 | +#### 1. System configuration |
| 11 | + |
| 12 | +1. Restrict applications, processes and service accounts to the least privileges possible |
| 13 | +2. Code which defines the infrastructure should follow the principle of least privilege. |
| 14 | +3. Remove all unnecessary functionality such as files, accounts, software, and demo capabilities |
| 15 | +4. Remove test code or any functionality not intended for production, prior to deployment |
| 16 | +5. The security configuration store for the application should be available in human readable form to support auditing |
| 17 | +6. Isolate development environments from production and provide access only to authorized development and test groups |
| 18 | +7. Implement a software change control system to manage and record changes to the code both in development and production |
| 19 | +8. Prevent accidentally accessible and sensitive pages from appearing in search engines using a robots.txt file, |
| 20 | +the |
| 21 | + X-Robots-Tag response header or a robots html meta tag |
| 22 | +9. Disable unnecessary HTTP methods, such as WebDAV extensions. If an extended HTTP method that supports file handling is |
| 23 | + required, utilize a well-vetted authentication mechanism |
| 24 | +10. Remove unnecessary information from HTTP response headers related to the OS, web-server version and application |
| 25 | + frameworks unless implemented to confuse an attacker |
| 26 | +11. Ensure the .git, .svn folders or any source control metadata aren't deployed together alongside the application in |
| 27 | + away that makes these directly accessible externally or indirectly through the application |
| 28 | +12. Do not store passwords, secrets, connection strings, key material, secret management integrations or other |
| 29 | + sensitive information in clear text or in any non-cryptographically secure manner on the client, in source code, or build |
| 30 | + artifacts |
| 31 | +13. Remove or restrict access to internal application and system documentation (such as for internal APIs) as this can |
| 32 | + reveal backend system or other useful information to attackers |
| 33 | + |
| 34 | +#### 2. File Management |
| 35 | + |
| 36 | +1. Turn off directory listings |
| 37 | +2. Do not save files in the same web context as the application |
| 38 | +3. Turn off execution privileges on file upload directories |
| 39 | +4. Ensure application files and resources are read-only |
| 40 | +5. Restrict access to files or other resources, including those outside the application's direct control using an allow list |
| 41 | + or the equivalent thereof. |
| 42 | + |
| 43 | +#### 3. Cloud security |
| 44 | + |
| 45 | +1. Enforce JIT (Just-In-Time) access management |
| 46 | +2. Use security vetted container images that is scanned for package and component vulnerabilities and pulled from a private |
| 47 | + container registry |
| 48 | +3. Utilize Infrastructure-as-Code templates for automated provisioning and configuration of your cloud and on- |
| 49 | + premises infrastructure |
| 50 | +4. Utilize Policy-as-Code to enforce policies including privilege assignments |
| 51 | + |
| 52 | +---- |
| 53 | + |
| 54 | +The OWASP Developer Guide is a community effort; if there is something that needs changing |
| 55 | +then [submit an issue][issue060201] or [edit on GitHub][edit060201]. |
| 56 | + |
| 57 | +[control5]: https://top10proactive.owasp.org/the-top-10/c5-secure-by-default/ |
| 58 | +[csproactive-c5]: https://cheatsheetseries.owasp.org/cheatsheets/Infrastructure_as_Code_Security_Cheat_Sheet.html |
| 59 | +[edit060201]: https://github.com/OWASP/DevGuide/blob/main/docs/en/04-design/02-web-app-checklist/01-secure-by-default.md |
| 60 | +[issue060201]: https://github.com/OWASP/DevGuide/issues/new?labels=enhancement&template=request.md&title=Update:%2004-design/02-web-app-checklist/01-secure-by-default |
0 commit comments