Skip to content

Commit 049b9dd

Browse files
authored
provide identifiers to the checklist
2 parents 06c6ea1 + 290c814 commit 049b9dd

12 files changed

+257
-256
lines changed

_data/draft.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ docs:
44
- title: '1. Introduction'
55
url: introduction
66

7-
- title: '*2. Foundations*'
7+
- title: '2. Foundations'
88
url: foundations
99

1010
- title: '2.1 Security fundamentals'

draft/06-design/01-threat-modeling/04-cornucopia.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -32,26 +32,25 @@ during the software development life cycle.
3232

3333
#### What is Cornucopia?
3434

35-
Cornucopia provides a [set of cards][cornucopia-cards] designed to gamify threat modeling activities.
36-
This is designed so that agile development teams can identify weaknesses in web applications
37-
and then record remediations or requirements.
35+
Cornucopia provides a [set of cards][cornucopia-cards] designed to gamify threat modeling activities,
36+
helping agile development teams to identify weaknesses in applications and then record remediations or requirements.
3837

3938
There are three versions of the Cornucopia deck of threat modeling cards:
4039

4140
* Website App Edition
4241
* Mobile App Edition
4342
* Enterprise App Edition
4443

45-
The decks come with different suits according to the application, and always contain a 'Cornucopia' suit.
44+
The decks come with several suits according to the application, and always contain an overall 'Cornucopia' suit.
4645

47-
There is no one 'right' way to play Cornucopia but there is a suggested [set of rules][cornucopia-play]
48-
to start the game off.
49-
Cornucopia provides a [score sheet][cornucopia-score] to help keep track of the game session and to record outcomes.
46+
Cornucopia can be played in many different ways, there is no one way,
47+
and there is a suggested [set of rules][cornucopia-play] to start the game off.
48+
Cornucopia provides a [score sheet][cornucopia-score] to can help keep track of the game session and to record outcomes.
5049

5150
#### Website App Edition
5251

5352
Each card in the Website App deck describes a common error or anti-pattern that allows systems to be vulnerable to attack.
54-
Vulnerabilities are arranged in domains as five key suits, with the additional Cornucopia suit ranging across domains:
53+
Vulnerabilities are arranged in domains as five suits with the additional Cornucopia suit ranging across these domains:
5554

5655
* Data Validation and Encoding
5756
* Authentication
@@ -82,7 +81,7 @@ with Cornucopia cross domain:
8281
* Cryptography
8382
* Cornucopia
8483

85-
To provide context the Cornucopia Mobile App cards reference other projects:
84+
For context the Cornucopia Mobile App cards reference these other projects:
8685

8786
* OWASP Mobile Application Security Verification Standard ([MASVS][masvs])
8887
* OWASP Mobile Application Security Testing Guide ([MASTG][mastg])
@@ -92,7 +91,8 @@ To provide context the Cornucopia Mobile App cards reference other projects:
9291
#### Ecommerce Website Edition
9392

9493
This is the original Cornucopia deck and has the same domains/suits, including the Cornucopia cross domain suit,
95-
as the Website App Edition. Some of the vulnerabilities are specific to Ecommerce, and it references the same projects.
94+
as the Website App Edition. Some of the vulnerabilities are specific to Ecommerce,
95+
but it references the same projects as the website edition.
9696

9797
#### Why use it?
9898

draft/06-design/02-web-app-checklist/01-define-security-requirements.md

Lines changed: 39 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -21,46 +21,46 @@ Refer to proactive control [C1: Define Security Requirements][control1]
2121
for more context from the OWASP Top 10 Proactive Controls project,
2222
and use the lists below as suggestions for a checklist that has been tailored for the individual project.
2323

24-
#### System configuration
25-
26-
* Restrict applications, processes and service accounts to the least privileges possible
27-
* If the application must run with elevated privileges, raise privileges as late as possible, and drop as soon as possible
28-
* Remove all unnecessary functionality and files
29-
* Remove test code or any functionality not intended for production, prior to deployment
30-
* The security configuration store for the application should be available in human readable form to support auditing
31-
* Isolate development environments from production and provide access only to authorized development and test groups
32-
* Implement a software change control system to manage and record changes to the code both in development and production
33-
34-
#### Cryptographic practices
35-
36-
* Use peer reviewed and open solution cryptographic modules
37-
* All cryptographic functions used to protect secrets from the application user must be implemented on a trusted system
38-
* Cryptographic modules must fail securely
39-
* Ensure all random elements such as numbers, file names, UUID and strings are generated
24+
#### 1. System configuration
25+
26+
1. Restrict applications, processes and service accounts to the least privileges possible
27+
1. If the application must run with elevated privileges, raise privileges as late as possible, and drop as soon as possible
28+
1. Remove all unnecessary functionality and files
29+
1. Remove test code or any functionality not intended for production, prior to deployment
30+
1. The security configuration store for the application should be available in human readable form to support auditing
31+
1. Isolate development environments from production and provide access only to authorized development and test groups
32+
1. Implement a software change control system to manage and record changes to the code both in development and production
33+
34+
#### 2. Cryptographic practices
35+
36+
1. Use peer reviewed and open solution cryptographic modules
37+
1. All cryptographic functions used to protect secrets from the application user must be implemented on a trusted system
38+
1. Cryptographic modules must fail securely
39+
1. Ensure all random elements such as numbers, file names, UUID and strings are generated
4040
using the cryptographic module approved random number generator
41-
* Cryptographic modules used by the application are compliant to FIPS 140-2 or an equivalent standard
42-
* Establish and utilize a policy and process for how cryptographic keys will be managed
43-
* Ensure that any secret key is protected from unauthorized access
44-
* Store keys in a proper secrets vault as described below
45-
* Use independent keys when multiple keys are required
46-
* Build support for changing algorithms and keys when needed
47-
* Build application features to handle a key rotation
48-
49-
#### File management
50-
51-
* Do not pass user supplied data directly to any dynamic include function
52-
* Require authentication before allowing a file to be uploaded
53-
* Limit the type of files that can be uploaded to only those types that are needed for business purposes
54-
* Validate uploaded files are the expected type by checking file headers rather than by file extension
55-
* Do not save files in the same web context as the application
56-
* Prevent or restrict the uploading of any file that may be interpreted by the web server.
57-
* Turn off execution privileges on file upload directories
58-
* When referencing existing files, use an allow-list of allowed file names and types
59-
* Do not pass user supplied data into a dynamic redirect
60-
* Do not pass directory or file paths, use index values mapped to pre-defined list of paths
61-
* Never send the absolute file path to the client
62-
* Ensure application files and resources are read-only
63-
* Scan user uploaded files for viruses and malware
41+
1. Cryptographic modules used by the application are compliant to FIPS 140-2 or an equivalent standard
42+
1. Establish and utilize a policy and process for how cryptographic keys will be managed
43+
1. Ensure that any secret key is protected from unauthorized access
44+
1. Store keys in a proper secrets vault as described below
45+
1. Use independent keys when multiple keys are required
46+
1. Build support for changing algorithms and keys when needed
47+
1. Build application features to handle a key rotation
48+
49+
#### 3. File management
50+
51+
1. Do not pass user supplied data directly to any dynamic include function
52+
1. Require authentication before allowing a file to be uploaded
53+
1. Limit the type of files that can be uploaded to only those types that are needed for business purposes
54+
1. Validate uploaded files are the expected type by checking file headers rather than by file extension
55+
1. Do not save files in the same web context as the application
56+
1. Prevent or restrict the uploading of any file that may be interpreted by the web server.
57+
1. Turn off execution privileges on file upload directories
58+
1. When referencing existing files, use an allow-list of allowed file names and types
59+
1. Do not pass user supplied data into a dynamic redirect
60+
1. Do not pass directory or file paths, use index values mapped to pre-defined list of paths
61+
1. Never send the absolute file path to the client
62+
1. Ensure application files and resources are read-only
63+
1. Scan user uploaded files for viruses and malware
6464

6565
#### References
6666

draft/06-design/02-web-app-checklist/02-frameworks-libraries.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -21,21 +21,21 @@ Refer to proactive control [C2: Leverage Security Frameworks and Libraries][cont
2121
for more context from the OWASP Top 10 Proactive Controls project,
2222
and use the list below as suggestions for a checklist that has been tailored for the individual project.
2323

24-
#### Security Frameworks and Libraries
25-
26-
* Ensure servers, frameworks and system components are running the latest approved versions and patches
27-
* Use libraries and frameworks from trusted sources that are actively maintained and widely used
28-
* Review all secondary applications and third party libraries to determine business necessity
29-
* Validate safe functionality for all secondary applications and third party libraries
30-
* Create and maintain an inventory catalog of all third party libraries using Software Composition Analysis (SCA)
31-
* Proactively keep all third party libraries and components up to date
32-
* Reduce the attack surface by encapsulating the library and expose only the required behaviour into your software
33-
* Use tested and approved managed code rather than creating new unmanaged code for common tasks
34-
* Utilize task specific built-in APIs to conduct operating system tasks
35-
* Do not allow the application to issue commands directly to the Operating System
36-
* Use checksums or hashes to verify the integrity of interpreted code, libraries, executables, and configuration files
37-
* Restrict users from generating new code or altering existing code
38-
* Implement safe updates using encrypted channels
24+
#### 1. Security Frameworks and Libraries
25+
26+
1. Ensure servers, frameworks and system components are running the latest approved versions and patches
27+
1. Use libraries and frameworks from trusted sources that are actively maintained and widely used
28+
1. Review all secondary applications and third party libraries to determine business necessity
29+
1. Validate safe functionality for all secondary applications and third party libraries
30+
1. Create and maintain an inventory catalog of all third party libraries using Software Composition Analysis (SCA)
31+
1. Proactively keep all third party libraries and components up to date
32+
1. Reduce the attack surface by encapsulating the library and expose only the required behaviour into your software
33+
1. Use tested and approved managed code rather than creating new unmanaged code for common tasks
34+
1. Utilize task specific built-in APIs to conduct operating system tasks
35+
1. Do not allow the application to issue commands directly to the Operating System
36+
1. Use checksums or hashes to verify the integrity of interpreted code, libraries, executables, and configuration files
37+
1. Restrict users from generating new code or altering existing code
38+
1. Implement safe updates using encrypted channels
3939

4040
#### References
4141

draft/06-design/02-web-app-checklist/03-secure-database-access.md

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -20,31 +20,31 @@ Refer to proactive control [C3: Secure Database Access][control3]
2020
for more context from the OWASP Top 10 Proactive Controls project,
2121
and use the list below as suggestions for a checklist that has been tailored for the individual project.
2222

23-
#### Secure queries
23+
#### 1. Secure queries
2424

25-
* Use Query Parameterization to prevent untrusted input being interpreted as part of a SQL command
26-
* Use strongly typed parameterized queries
27-
* Utilize input validation and output encoding and be sure to address meta characters
28-
* Do not run the database command if input validation fails
29-
* Ensure that variables are strongly typed
30-
* Connection strings should not be hard coded within the application
31-
* Connection strings should be stored in a separate configuration file on a trusted system and they should be encrypted
25+
1. Use Query Parameterization to prevent untrusted input being interpreted as part of a SQL command
26+
1. Use strongly typed parameterized queries
27+
1. Utilize input validation and output encoding and be sure to address meta characters
28+
1. Do not run the database command if input validation fails
29+
1. Ensure that variables are strongly typed
30+
1. Connection strings should not be hard coded within the application
31+
1. Connection strings should be stored in a separate configuration file on a trusted system and they should be encrypted
3232

33-
#### Secure configuration
33+
#### 2. Secure configuration
3434

35-
* The application should use the lowest possible level of privilege when accessing the database
36-
* Use stored procedures to abstract data access and allow for the removal of permissions to the base tables in the database
37-
* Close the database connection as soon as possible
38-
* Turn off all unnecessary database functionality
39-
* Remove unnecessary default vendor content, for example sample schemas
40-
* Disable any default accounts that are not required to support business requirements
35+
1. The application should use the lowest possible level of privilege when accessing the database
36+
1. Use stored procedures to abstract data access and allow for the removal of permissions to the base tables in the database
37+
1. Close the database connection as soon as possible
38+
1. Turn off all unnecessary database functionality
39+
1. Remove unnecessary default vendor content, for example sample schemas
40+
1. Disable any default accounts that are not required to support business requirements
4141

42-
#### Secure authentication
42+
#### 3. Secure authentication
4343

44-
* Remove or change all default database administrative passwords
45-
* The application should connect to the database with different credentials for every trust distinction
44+
1. Remove or change all default database administrative passwords
45+
1. The application should connect to the database with different credentials for every trust distinction
4646
(for example user, read-only user, guest, administrators)
47-
* Use secure credentials for database access
47+
1. Use secure credentials for database access
4848

4949
#### References
5050

draft/06-design/02-web-app-checklist/04-encode-escape-data.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -25,23 +25,23 @@ Refer to proactive control [C4: Encode and Escape Data][control4]
2525
for more context from the OWASP Top 10 Proactive Controls project,
2626
and use the list below as suggestions for a checklist that has been tailored for the individual project.
2727

28-
#### Character encoding and canonicalization
28+
#### 1. Character encoding and canonicalization
2929

30-
* Apply output encoding just before the content is passed to the target system
31-
* Conduct all output encoding on a trusted system
32-
* Utilize a standard, tested routine for each type of outbound encoding
33-
* Specify character sets, such as UTF-8, for all outputs
34-
* Apply canonicalization to convert unicode data into a standard form
35-
* Ensure the output encoding is safe for all target systems
36-
* In particular sanitize all output used for operating system commands
30+
1. Apply output encoding just before the content is passed to the target system
31+
1. Conduct all output encoding on a trusted system
32+
1. Utilize a standard, tested routine for each type of outbound encoding
33+
1. Specify character sets, such as UTF-8, for all outputs
34+
1. Apply canonicalization to convert unicode data into a standard form
35+
1. Ensure the output encoding is safe for all target systems
36+
1. In particular sanitize all output used for operating system commands
3737

38-
#### Contextual output encoding
38+
#### 2. Contextual output encoding
3939

4040
Contextual output encoding of data is based on how it will be utilized by the target.
4141
The specific methods vary depending on the way the output data is used, such as HTML entity encoding.
4242

43-
* Contextually encode all data returned to the client from untrusted sources
44-
* Contextually encode all output of untrusted data to queries for SQL, XML, and LDAP
43+
1. Contextually encode all data returned to the client from untrusted sources
44+
1. Contextually encode all output of untrusted data to queries for SQL, XML, and LDAP
4545

4646
#### References
4747

draft/06-design/02-web-app-checklist/05-validate-inputs.md

Lines changed: 30 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -24,37 +24,37 @@ Refer to proactive control [C5: Validate All Inputs][control5]
2424
for more context from the OWASP Top 10 Proactive Controls project,
2525
and use the list below as suggestions for a checklist that has been tailored for the individual project.
2626

27-
#### Syntax and semantic validity
28-
29-
* Identify all data sources and classify them into trusted and untrusted
30-
* Validate all input data from untrusted sources such as client provided data
31-
* Encode input to a common character set before validating
32-
* Specify character sets, such as UTF-8, for all input sources
33-
* If the system supports UTF-8 extended character sets then validate after UTF-8 decoding is completed
34-
* Verify that protocol header values in both requests and responses contain only ASCII characters
35-
* Validate data from redirects
36-
* Validate data range and also data length
37-
* Utilize canonicalization to address obfuscation attacks
38-
* All validation failures should result in input rejection
39-
40-
#### Libraries and frameworks
41-
42-
* Conduct all input validation on a trusted system
43-
* Use a centralized input validation library or framework for the whole application
44-
* If the standard validation routine cannot address some inputs then use extra discrete checks
45-
* If any potentially hazardous input _must_ be allowed then implement additional controls
46-
* Validate for expected data types using an allow-list rather than a deny-list
47-
48-
#### Validate serialized data
49-
50-
* Implement integrity checks or encryption of the serialized objects
27+
#### 1. Syntax and semantic validity
28+
29+
1. Identify all data sources and classify them into trusted and untrusted
30+
1. Validate all input data from untrusted sources such as client provided data
31+
1. Encode input to a common character set before validating
32+
1. Specify character sets, such as UTF-8, for all input sources
33+
1. If the system supports UTF-8 extended character sets then validate after UTF-8 decoding is completed
34+
1. Verify that protocol header values in both requests and responses contain only ASCII characters
35+
1. Validate data from redirects
36+
1. Validate data range and also data length
37+
1. Utilize canonicalization to address obfuscation attacks
38+
1. All validation failures should result in input rejection
39+
40+
#### 2. Libraries and frameworks
41+
42+
1. Conduct all input validation on a trusted system[^SCP1]
43+
1. Use a centralized input validation library or framework for the whole application
44+
1. If the standard validation routine cannot address some inputs then use extra discrete checks
45+
1. If any potentially hazardous input _must_ be allowed then implement additional controls
46+
1. Validate for expected data types using an allow-list rather than a deny-list
47+
48+
#### 3. Validate serialized data
49+
50+
1. Implement integrity checks or encryption of the serialized objects
5151
to prevent hostile object creation or data tampering
52-
* Enforce strict type constraints during deserialization before object creation;
52+
1. Enforce strict type constraints during deserialization before object creation;
5353
typically a definable set of classes is expected
54-
* Isolate features that deserialize so that they run in very low privilege environments such as temporary containers
55-
* Log security deserialization exceptions and failures
56-
* Restrict or monitor incoming and outgoing network connectivity from containers or servers that deserialize
57-
* Monitor deserialization, for example alerting if a user agent constantly deserializes
54+
1. Isolate features that deserialize so that they run in very low privilege environments such as temporary containers
55+
1. Log security deserialization exceptions and failures
56+
1. Restrict or monitor incoming and outgoing network connectivity from containers or servers that deserialize
57+
1. Monitor deserialization, for example alerting if a user agent constantly deserializes
5858

5959
#### References
6060

@@ -73,5 +73,6 @@ then [submit an issue][issue060205] or [edit on GitHub][edit060205].
7373
[edit060205]: https://github.com/OWASP/www-project-developer-guide/blob/main/draft/06-design/02-web-app-checklist/05-validate-inputs.md
7474
[proactive10]: https://owasp.org/www-project-proactive-controls/
7575
[sanitizer]: https://www.owasp.org/index.php/OWASP_Java_HTML_Sanitizer
76+
[^SCP1]: maybe this
7677

7778
\newpage

0 commit comments

Comments
 (0)