Skip to content

Commit 5fe09ea

Browse files
committed
fix
1 parent e6dc9be commit 5fe09ea

3 files changed

Lines changed: 18 additions & 0 deletions

File tree

fundamentals/threatmodel.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,13 @@ Below the core high level Python Treat model:
4545

4646
![python threat model](../images/threatmodel.png)
4747

48+
In strict security engineering, a weakness and a vulnerability are not the same thing.
49+
50+
- Weakness ([CWE)](https://cwe.mitre.org/index.html)): This is a type of flaw, mistake, or bug in software, hardware, or system architecture. It is an internal characteristic of the code or design (e.g., "failing to validate user input" or "using a weak encryption algorithm"). A weakness exists in a vacuum, regardless of whether it is deployed or targeted.
51+
52+
- Vulnerability [(CVE)](https://www.cve.org/About/Overview): This occurs when a weakness is actually present in a specific, deployable system, and an attacker can realistically exploit it to cause harm.
53+
54+
A weakness is Python code can become a vulnerability only when it exists in a real-world environment where it is reachable and exploitable by a threat.
4855

4956

5057
## STRIDE Threat Model

fundamentals/whatissast.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,8 @@ To use a Python SAST scanner effectively, it is vital to understand the differen
139139
**Weakness (or potential security issue):**
140140
A weakness is a flaw, error, poor design choice, or unsafe programming practice in your code that *might* create security problems under certain conditions. It represents an increased risk, but it is not necessarily exploitable in your specific context.
141141

142+
Weaknesses do not create or lead to threats; rather, they act as an open door for existing threats.
143+
142144
Examples in Python:
143145

144146
- Using `eval()` on user input. This is a weakness because it allows arbitrary code execution **if** misused.
@@ -154,8 +156,17 @@ A vulnerability is a weakness that can be **actually exploited** by an attacker
154156

155157
:::{important}
156158
A weakness becomes a vulnerability only when the right conditions, inputs, and attacker capabilities align. Many weaknesses remain harmless in practice, while others can become critical depending on how and where the application runs.
159+
160+
So: Weaknesses lead to vulnerabilities, not threats.
157161
:::
158162

163+
Example:
164+
1. A developer introduces a Weakness (e.g., forgets to sanitize inputs).
165+
2. Because this code is deployed in a live environment, it becomes a Vulnerability (an open door).
166+
3. A Threat (the hacker) discovers the vulnerability and exploits it.
167+
4. This results in a Security Incident or breach. But this security incident can be **prevented** when using a Python SAST tool before deployment.
168+
169+
159170
### Why This Distinction Matters
160171

161172
Not every issue reported by a SAST tool needs urgent fixing. However, every weakness should be **evaluated** rather than ignored. Treating weaknesses seriously significantly reduces the likelihood of exploitable vulnerabilities appearing later.

images/threatmodel.png

-11.7 KB
Loading

0 commit comments

Comments
 (0)