Skip to content

Commit b27130c

Browse files
authored
Fixes #131 Top 10 proactivecontrols (#142)
* Update and rename 01-define-security-requirements.md to 04-address-security-from-the-start.md * Update and rename 02-frameworks-libraries.md to 06-keep-your-components-secure.md * Update 06-digital-identity.md * Rename 04-address-security-from-the-start.md to 01-address-security-from-the-start.md * Rename 06-keep-your-components-secure.md to 02-keep-your-components-secure.md * Update 08-protect-data.md * Create 02-secure-by-default-configurations.md * Create 03-secure-by-default-configurations.md * Delete docs/en/04-design/02-web-app-checklist/02-secure-by-default-configurations.md * Update 03-secure-by-default-configurations.md * Move configuration requirements to secure by default configuration * correct linking * Update 02-keep-your-components-secure.md * Rename 03-secure-database-access.md to 04-secure-database-access.md * Rename 04-secure-database-access.md to 06-secure-database-access.md * Rename 06-digital-identity.md to 07-digital-identity.md * Rename 07-access-controls.md to 08-access-controls.md * Rename 08-protect-data.md to 09-protect-data.md * Rename 09-logging-monitoring.md to 10-logging-monitoring.md * Rename 10-handle-errors-exceptions.md to 11-handle-errors-exceptions.md * Add C10 from proactive controls * Update 04-encode-escape-data.md * Remove duplicate bullet point thart belongs to the encoding list * Update 01-address-security-from-the-start.md * Move bullet point from 01-address-security-from-the-start.md * Move bullet point to 08-access-controls.md * Remove bullet point that was meant for the access control list and that has become wrongly added to the authentication list * Update 09-protect-data.md * Add the practice * Move cryptographic practices to data protection * Change headers to conform to Top 10 Proactive Controls * Move data protection at rest bullet points under the appropriate header * Move file validation from address-security-from-the-start * Move authentication related issue to the authentication list. * Move from file management to secure by default * Move from address security from the start * move from secure from the start * No longer of interest as the new chapter now is called secure by default * Rename 03-secure-by-default-configurations.md to 01-secure-by-default-configurations.md * Update and rename 01-secure-by-default-configurations.md to 01-secure-by-default.md * Update and rename 04-encode-escape-data.md to 03-encode-escape-data.md * Rename 06-secure-database-access.md to 03-secure-database-access.md * Update and rename 03-encode-escape-data.md to 04-encode-escape-data.md * Rename 02-keep-your-components-secure.md to 02-frameworks-libraries.md * Add directions for editing * Fix link * Sort and create the file management header under secure by default * create header * Add JIT * Add cloud security * Add point about infra and policy as code. * Add point about infra as code * Add point from proactive controls * Move to validation * Move feom framework and libraryies * Add additional points about scanning for vulnerabilities * Shorten sentence * Move to access control * Move from digital identities * Add point related to session management * Move JIT to secure by default * Add jit * Add requirements for new accounts * Add JIT requirement * Separate the access control list into implementing and management * Add points from proactive controls * Add point about secret management * Add secret management list * Add point about logging * Add point about turning off older protocols * Add point about not serving http * Add point about the use of client side secure transmission features * Rename 07-digital-identity.md to 06-digital-identity.md * Rename 08-access-controls.md to 07-access-controls.md * Rename 09-protect-data.md to 08-protect-data.md * Rename 10-logging-monitoring.md to 09-logging-monitoring.md * Rename 11-handle-errors-exceptions.md to 10-handle-errors-exceptions.md * Fix linting * Fix linting * Fix ordering * Fix linting * Fix ordering * Update 02-frameworks-libraries.md * Fix linting * Fix linting * Fix linting * Fix ordering * Fix linting * Fix linting * Fix prdering * Fix spelling * Add words
1 parent 3c55d01 commit b27130c

9 files changed

+181
-147
lines changed

.wordlist-en.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,9 @@ InlineHilite
115115
Istio
116116
JA
117117
JDK
118+
JEA
118119
JIRA
120+
JIT
119121
JSON
120122
JSONP
121123
JSP

docs/en/04-design/02-web-app-checklist/01-define-security-requirements.md

Lines changed: 0 additions & 81 deletions
This file was deleted.
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
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

docs/en/04-design/02-web-app-checklist/02-frameworks-libraries.md

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Secure coding libraries and software frameworks with embedded security help software developers guard against
22
security-related design and implementation flaws.
33

4-
Refer to proactive control [C4: Address Security from the Start][control4]
4+
Refer to proactive control [C6: Keep your Components Secure][control6]
55
and its [cheatsheets][csproactive-c2] for more context from the OWASP Top 10 Proactive Controls project.
66

77
For technology specific checklists refer to the appropriate OWASP Cheat Sheets:
@@ -39,16 +39,18 @@ In addition consider the following extra checks for frameworks and libraries.
3939
2. Use libraries and frameworks from trusted sources that are actively maintained and widely used
4040
3. Review all secondary applications and third party libraries to determine business necessity
4141
4. Validate safe functionality for all secondary applications and third party libraries
42-
5. Create and maintain an inventory catalog of all third party libraries using Software Composition Analysis (SCA)
42+
5. Create and maintain an inventory catalog of all third party libraries. It is recommended to automatically create
43+
SBOMs (Software-Bill-Of-Materials) from within the build pipeline.
4344
6. Proactively keep all third party libraries and components up to date
4445
7. Reduce the attack surface by encapsulating the library and expose only the required behavior into your software
4546
8. Use tested and approved managed code rather than creating new unmanaged code for common tasks
4647
9. Utilize task specific built-in APIs to conduct operating system tasks
47-
10. Do not allow the application to issue commands directly to the Operating System
48-
11. Use checksums or hashes to verify the integrity of interpreted code, libraries, executables, and configuration files
49-
12. Restrict users from generating new code or altering existing code
50-
13. Implement safe updates using encrypted channels
51-
14. Use cryptographic signatures when updating your code and ensure the package manager verify those signatures
48+
10. Use checksums or hashes to verify the integrity of interpreted code, libraries, executables, and configuration files
49+
11. Restrict users from generating new code or altering existing code
50+
12. Implement safe updates using encrypted channels
51+
13. Use cryptographic signatures when updating your code and ensure the package manager verify those signatures
52+
14. Use your SBOMs together with periodic or SCA tools to automatically detect well-known publicly disclosed vulnerabilities.
53+
15. integrate SCA tools in early stages of software development
5254

5355
#### References
5456

@@ -84,7 +86,7 @@ then [submit an issue][issue060202] or [edit on GitHub][edit060202].
8486
[cswebservice]: https://cheatsheetseries.owasp.org/cheatsheets/Web_Service_Security_Cheat_Sheet
8587
[csxml]: https://cheatsheetseries.owasp.org/cheatsheets/XML_Security_Cheat_Sheet
8688
[csproactive-c2]: https://cheatsheetseries.owasp.org/IndexProactiveControls.html#c2-leverage-security-frameworks-and-libraries
87-
[control4]: https://top10proactive.owasp.org/the-top-10/c4-secure-architecture/
89+
[control6]: https://top10proactive.owasp.org/the-top-10/c6-use-secure-dependencies/
8890
[dependency]: https://owasp.org/www-project-dependency-check/
8991
[edit060202]: https://github.com/OWASP/DevGuide/blob/main/docs/en/04-design/02-web-app-checklist/02-frameworks-libraries.md
9092
[issue060202]: https://github.com/OWASP/DevGuide/issues/new?labels=enhancement&template=request.md&title=Update:%2004-design/02-web-app-checklist/02-frameworks-libraries

docs/en/04-design/02-web-app-checklist/04-encode-escape-data.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@ The target system may be another software component or it may be reflected back
55
such as operating system commands,
66
so encoding and escaping output data helps to provide defense in depth for the system as a whole.
77

8-
Refer to proactive control [C3: Validate all Input & Handle Exceptions][control3] and its [cheatsheets][csproactive-c4]
8+
Refer to proactive control [C3: Validate all Input & Handle Exceptions][control3] and its [cheatsheets][csproactive-c4] and
9+
[C10: Stop Server Side Request Forgery][control10] together with
10+
[Server-Side Request Forgery Prevention Cheat Sheet][csproactive-c10]
911
for more context from the OWASP Top 10 Proactive Controls project,
1012
and use the list below as suggestions for a checklist that has been tailored for the individual project.
1113

@@ -15,7 +17,7 @@ and use the list below as suggestions for a checklist that has been tailored for
1517
2. Conduct all output encoding on a trusted system
1618
3. Utilize a standard, tested routine for each type of outbound encoding
1719
4. Specify character sets, such as UTF-8, for all outputs
18-
5. Apply canonicalization to convert unicode data into a standard form
20+
5. Apply canonicalization to convert unicode data into a standard form and address obfuscation attacks
1921
6. Ensure the output encoding is safe for all target systems
2022
7. In particular sanitize all output used for operating system commands
2123
8. Sanitize potentially dangerous characters before using the data to call another service
@@ -40,7 +42,9 @@ The OWASP Developer Guide is a community effort; if there is something that need
4042
then [submit an issue][issue060204] or [edit on GitHub][edit060204].
4143

4244
[csproactive-c4]: https://cheatsheetseries.owasp.org/IndexProactiveControls.html#c4-encode-and-escape-data
45+
[csproactive-c10]: https://cheatsheetseries.owasp.org/cheatsheets/Server_Side_Request_Forgery_Prevention_Cheat_Sheet.html
4346
[control3]: https://top10proactive.owasp.org/the-top-10/c3-validate-input-and-handle-exceptions/
47+
[control10]: https://top10proactive.owasp.org/the-top-10/c10-stop-server-side-request-forgery/
4448
[edit060204]: https://github.com/OWASP/DevGuide/blob/main/docs/en/04-design/02-web-app-checklist/04-encode-escape-data.md
4549
[encoder]: https://www.owasp.org/index.php/OWASP_Java_Encoder_Project
4650
[ipcs]: https://cheatsheetseries.owasp.org/cheatsheets/Injection_Prevention_Cheat_Sheet

docs/en/04-design/02-web-app-checklist/05-validate-inputs.md

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,8 @@ and use the list below as suggestions for a checklist that has been tailored for
1818
6. Verify that protocol header values in both requests and responses contain only ASCII characters
1919
7. Validate data from redirects
2020
8. Validate data range and also data length
21-
9. Utilize canonicalization to address obfuscation attacks
22-
10. All validation failures should result in input rejection
23-
11. Validate all input against an allowlist of characters, whenever possible
21+
9. All validation failures should result in input rejection
22+
10. Validate all input against an allowlist of characters, whenever possible
2423

2524
#### 2. Libraries and frameworks
2625

@@ -29,6 +28,7 @@ and use the list below as suggestions for a checklist that has been tailored for
2928
3. If the standard validation routine cannot address some inputs then use extra discrete checks
3029
4. If any potentially hazardous input _must_ be allowed then implement additional controls
3130
5. Validate for expected data types using an allow-list rather than a deny-list
31+
6. Do not allow the application to issue commands directly to the Operating System
3232

3333
#### 3. Validate serialized data
3434

@@ -41,6 +41,18 @@ and use the list below as suggestions for a checklist that has been tailored for
4141
5. Restrict or monitor incoming and outgoing network connectivity from containers or servers that deserialize
4242
6. Monitor deserialization, for example alerting if a user agent constantly deserializes
4343

44+
#### 4. File validation
45+
46+
1. Do not pass user supplied data directly to any dynamic include function
47+
2. Limit the type of files that can be uploaded to only those types that are needed for business purposes
48+
3. Validate uploaded files are the expected type by checking file headers rather than by file extension
49+
4. Prevent or restrict the uploading of any file that may be interpreted by the web server.
50+
5. When referencing existing files, use an allow-list of allowed file names and types
51+
6. Do not pass user supplied data into a dynamic redirect
52+
7. Do not pass directory or file paths, use index values mapped to pre-defined list of paths
53+
8. Never send the absolute file path to the client
54+
9. Scan user uploaded files for viruses and malware
55+
4456
#### References
4557

4658
* OWASP [Cheat Sheet: Input Validation][ivcs]

0 commit comments

Comments
 (0)