Skip to content

Commit 172a86c

Browse files
Fix markdownlint warnings
Signed-off-by: David A. Wheeler <[email protected]>
1 parent da69e8e commit 172a86c

File tree

3 files changed

+309
-2
lines changed

3 files changed

+309
-2
lines changed

.github/linters/.markdown-lint.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ MD049: false # MD049/emphasis-style
1010
MD012: false # MD012/no-multiple-blank
1111
MD001: false # MD001/heading-increment/header-increment
1212

13+
# For the moment, disable
14+
MD024: false # MD024/no-duplicate-heading/no-duplicate-header
15+
1316
# We enforce "no duplicate headers" so hypertext links to sections will have
1417
# unique anchor names to refer to.
1518
# MD024: false # MD024/no-duplicate-heading/no-duplicate-header

secure_software_development_fundamentals.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2083,7 +2083,7 @@ If it matters, make sure you process your data by using an environment you can t
20832083

20842084
Which leads us to a useful rule-of-thumb: *whenever given a choice, try to use the more trusted data.*
20852085

2086-
An example might help. Many systems, when sent a password reset request, send an email to confirm the password reset. At one time GitHub would ask an untrusted user for their email address. If that matched an email address in their database, ignoring upper/lower case distinctions using the rules of English, GitHub would send the password reset to the email address *as provided by the attacker*. This was a terrible idea. Email standards do not guarantee that the local part of the email address (the part before the **@** symbol) is case insensitive (see [IETF RFC 5321 section 2.3.11](https://tools.ietf.org/html/rfc5321#section-2.3.11)). By converting the email address to lower case, there is no guarantee that the reset would be sent to the correct email address. Many email systems do ignore upper/lower case distinctions, but they might not use English! In some Turkic email systems, the local part of the email address would normalize to a *different* distinct email account than the original account. For example, **[email protected]** would normalize to **mı[email protected]** (using a dotless i), which would be a different email account from **[email protected]** (which uses a dotted i). This led to an exploitable vulnerability (GitHub Security, [*Password reset emails delivered to the wrong address*](https://bounty.github.com/researchers/jagracey.html), 2016).
2086+
An example might help. Many systems, when sent a password reset request, send an email to confirm the password reset. At one time GitHub would ask an untrusted user for their email address. If that matched an email address in their database, ignoring upper/lower case distinctions using the rules of English, GitHub would send the password reset to the email address *as provided by the attacker*. This was a terrible idea. Email standards do not guarantee that the local part of the email address (the part before the **@** symbol) is case insensitive (see [IETF RFC 5321 section 2.3.11](https://tools.ietf.org/html/rfc5321#section-2.3.11)). By converting the email address to lower case, there is no guarantee that the reset would be sent to the correct email address. Many email systems do ignore upper/lower case distinctions, but they might not use English! In some Turkic email systems, the local part of the email address would normalize to a *different* distinct email account than the original account. For example, **MIKE&#x40;example.org** would normalize to **mıke&#x40;example.org** (using a dotless i), which would be a different email account from **mike&#x40;example.org** (which uses a dotted i). This led to an exploitable vulnerability (GitHub Security, [*Password reset emails delivered to the wrong address*](https://bounty.github.com/researchers/jagracey.html), 2016).
20872087

20882088
This attack seems subtle, but this is a clear violation of our basic rule of thumb: if you have more trusted data available, try to use *that* more trusted data! For example, if you have a password reset request, and you want to send an email to confirm that the originally-confirmed user authorized it, you should send the reset email to exactly the *already confirmed* email address in your database. You have already confirmed that is the correct email address, so you can place more trust in it. This simple rule - *try to use the more trusted data* - will avoid many subtle attacks without you even realizing it.
20892089

@@ -4894,7 +4894,7 @@ You must tell others, publicly, how to send vulnerability reports… and this in
48944894

48954895
In one sense this requirement is easy. Decide what your reporting convention is, and make that information easy to find. Here are some common conventions:
48964896

4897-
1. Many companies and projects support an email address of the form **security@example.com** or **abuse@example.com**.
4897+
1. Many companies and projects support an email address of the form **security&#x40;example.com** or **abuse&#x40;example.com**.
48984898

48994899
2. A common convention in OSS projects is to provide this information in a file named **SECURITY.md** in the repository’s root or **docs/** directory. Sites such as GitHub will highlight this file if present and encourage their creation. Add a link from your **README.md** file to this **SECURITY.md** file.
49004900

toc.md

Lines changed: 304 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,307 @@
1+
# secure-sw-dev-fundamentals: Secure Software Development Fundamentals courses (from the OpenSSF Best Practices WG)
2+
3+
## Highlights
4+
5+
## Details
6+
7+
# SECURITY
8+
9+
# Part I: Requirements, Design, and Reuse
10+
11+
# Course Introduction
12+
13+
## Introduction
14+
15+
## A Note from the Author
16+
17+
## Motivation
18+
19+
### Motivation: Why Is It Important to Secure Software?
20+
21+
### Motivation: Why Take This course?
22+
23+
# Security Basics
24+
25+
## What Do We Need?
26+
27+
### What Does “Security” Mean?
28+
29+
### Security Requirements
30+
31+
### What Is Privacy and Why It Is Important
32+
33+
### Privacy Requirements
34+
35+
## How Can We Get There?
36+
37+
### Risk Management
38+
39+
### Development Processes / Defense-in-Breadth
40+
41+
### Protect, Detect, Respond
42+
43+
### Vulnerabilities
44+
45+
# Design
46+
47+
## Secure Design Basics
48+
49+
### What Are Security Design Principles?
50+
51+
### Widely-Recommended Secure Design Principles
52+
53+
### Least Privilege
54+
55+
### Complete Mediation (Non-Bypassability)
56+
57+
### The Rest of the Saltzer & Schroeder Design Principles
58+
59+
### Other Design Principles
60+
61+
# Reusing External Software
62+
63+
## Supply Chain
64+
65+
### Basics of Reusing Software
66+
67+
### Selecting (Evaluating) Open Source Software
68+
69+
### Downloading and Installing Reusable Software
70+
71+
### Updating Reused Software
72+
73+
# Part II: Implementation
74+
75+
# Basics of Implementation
76+
77+
### Implementation Overview
78+
79+
# Input Validation
80+
81+
## Input Validation Basics
82+
83+
### Input Validation Basics Introduction
84+
85+
### How Do You Validate Input?
86+
87+
## Input Validation: Numbers and Text
88+
89+
### Input Validation: A Few Simple Data Types
90+
91+
### Sidequest: Text, Unicode, and Locales
92+
93+
### Validating Text
94+
95+
### Introduction to Regular Expressions
96+
97+
### Using Regular Expressions for Text Input Validation
98+
99+
### Countering ReDoS Attacks on Regular Expressions
100+
101+
## Input Validation: Beyond Numbers and Text
102+
103+
### Insecure Deserialization
104+
105+
### Input Data Structures (XML, HTML, CSV, JSON, & File Uploads)
106+
107+
### Minimizing Attack Surface, Identification, Authentication, and Authorization
108+
109+
### Search Paths and Environment Variables (including setuid/setgid Programs)
110+
111+
### Special Inputs: Secure Defaults and Secure Startup
112+
113+
## Consider Availability on All Inputs
114+
115+
### Consider Availability on All Inputs Introduction
116+
117+
# Processing Data Securely
118+
119+
## Processing Data Securely: General Issues
120+
121+
### Prefer Trusted Data. Treat Untrusted Data as Dangerous
122+
123+
### Avoid Default & Hardcoded Credentials
124+
125+
### Avoid Incorrect Conversion or Cast
126+
127+
## Processing Data Securely: Undefined Behavior / Memory Safety
128+
129+
### Countering Out-of-Bounds Reads and Writes (Buffer Overflow)
130+
131+
### Double-free, Use-after-free, and Missing Release
132+
133+
### Avoid Undefined Behavior
134+
135+
## Processing Data Securely: Calculate Correctly
136+
137+
### Avoid Integer Overflow, Wraparound, and Underflow
138+
139+
# Calling Other Programs
140+
141+
## Introduction to Securely Calling Programs
142+
143+
### Introduction to Securely Calling Programs - The Basics
144+
145+
## Calling Other Programs: Injection and Filenames
146+
147+
### SQL Injection Vulnerability
148+
149+
### SQL Injection: Parameterized Statements
150+
151+
### SQL Injection: DBMS (Server) side vs. Application (client) side
152+
153+
### SQL Injection: Alternatives to Parameterized Statements
154+
155+
### OS Command (Shell) injection
156+
157+
### Other Injection Attacks
158+
159+
### Filenames (Including Path Traversal and Link Following)
160+
161+
## Calling Other Programs: Other Issues
162+
163+
### Call APIs for Programs and Check What Is Returned
164+
165+
### Handling Errors
166+
167+
### Logging
168+
169+
### Debug and Assertion Code
170+
171+
### Countering Denial-of-Service (DoS) Attacks
172+
173+
# Sending Output
174+
175+
### Introduction to Sending Output
176+
177+
### Countering Cross-Site Scripting (XSS)
178+
179+
### Content Security Policy (CSP)
180+
181+
### Other HTTP Hardening Headers
182+
183+
### Cookies & Login Sessions
184+
185+
### CSRF / XSRF
186+
187+
### Open Redirects and Forwards
188+
189+
### HTML **target** and JavaScript **window.open()**
190+
191+
### Using Inadequately Checked URLs / Server-Side Request Forgery (SSRF)
192+
193+
### Same-Origin Policy and Cross-Origin Resource Sharing (CORS)
194+
195+
### Format Strings and Templates
196+
197+
### Minimize Feedback / Information Exposure
198+
199+
### Avoid caching sensitive information
200+
201+
### Side-Channel Attacks
202+
203+
# Part III: Verification and More Specialized Topics
204+
205+
# Verification
206+
207+
## Basics of Verification
208+
209+
### Verification Overview
210+
211+
## Static Analysis
212+
213+
### Static Analysis Overview
214+
215+
### Software Composition Analysis (SCA)/Dependency Analysis
216+
217+
## Dynamic Analysis
218+
219+
### Dynamic Analysis Overview
220+
221+
### Fuzz Testing
222+
223+
### Web Application Scanners
224+
225+
## Other Verification Topics
226+
227+
### Combining Verification Approaches
228+
229+
# Threat Modeling
230+
231+
## Threat Modeling/Attack Modeling
232+
233+
### Introduction to Threat Modeling
234+
235+
### STRIDE
236+
237+
# Cryptography
238+
239+
## Applying Cryptography
240+
241+
### Introduction to Cryptography
242+
243+
### Symmetric/Shared Key Encryption Algorithms
244+
245+
### Cryptographic Hashes (Digital Fingerprints)
246+
247+
### Public-Key (Asymmetric) Cryptography
248+
249+
### Cryptographically Secure Pseudo-Random Number Generator (CSPRNG)
250+
251+
### Storing Passwords
252+
253+
### Transport Layer Security (TLS)
254+
255+
### Other Topics in Cryptography
256+
257+
# Other Topics
258+
259+
## Vulnerability Disclosures
260+
261+
### Receiving Vulnerability Reports
262+
263+
### Respond To and Fix the Vulnerability in a Timely Way
264+
265+
### Sending Vulnerability Reports to Others
266+
267+
## Miscellaneous
268+
269+
### Assurance Cases
270+
271+
### Harden the Development Environment (Including Build and CI/CD Pipeline) & Distribution Environment
272+
273+
### Distributing, Fielding/Deploying, Operations, and Disposal
274+
275+
### Artificial Intelligence (AI), Machine Learning (ML), and Security
276+
277+
### Formal Methods
278+
279+
## Top Vulnerability Lists
280+
281+
### OWASP Top 10
282+
283+
### CWE Top 25
284+
285+
## Concluding Notes
286+
287+
### Conclusions
288+
289+
# Part IV: Supporting Materials Not Part of the Course
290+
291+
# Glossary
292+
293+
# Further Reading
294+
295+
# Old Mappings
296+
297+
## OWASP Top 10 and CWE Top 25
298+
299+
### OWASP Top 10 (2017 edition)
300+
301+
### CWE Top 25 (2019 edition)
302+
303+
# References
304+
1305
# Part I: Requirements, Design, and Reuse
2306

3307
# Course Introduction

0 commit comments

Comments
 (0)