https://github.com/donnemartin/system-design-primer.git ·
lang: python ·
LOC: ·
source: user_submitted
| Rule | Severity | Count |
|---|---|---|
MINED108 self.attribute used but never assigned in __init__ |
high | 25 |
MINED050 Stub Only Function |
info | 4 |
COMP001 [COMP001] High cognitive complexity: Function `load_yfinanc… |
low | 1 |
SEC029 Server-Side Request Forgery (SSRF) — outbound HTTP from use… |
high | 1 |
MINED107 Missing Python import (NameError at runtime) |
critical | 1 |
CORE_NO_TESTS No test files found |
high | 1 |
SEC127 AI agent stub — TODO: implement / pass placeholder body |
medium | 1 |
CORE_NO_CI No CI/CD configuration found |
medium | 1 |
MINED107
Missing Python import (NameError at runtime)
CWE-1075
solutions/system_design/social_graph/social_graph_snippets.py:17
· conf 1.00
[MINED107] Missing import: `queue` used but not imported: The file uses `queue.something(...)` but never imports `queue`. This raises NameError at runtime the first time the line executes.
CORE_NO_TESTS
No test files found
No test files found
MINED108
self.attribute used but never assigned in __init__
CWE-476
solutions/object_oriented_design/call_center/call_center.py:49
· conf 1.00
[MINED108] `self.call` used but never assigned in __init__: Method `escalate_call` of class `Operator` reads `self.call`, but no assignment to it exists in __init__ (and no class-level fallback). Thi…
MINED108
self.attribute used but never assigned in __init__
CWE-476
solutions/object_oriented_design/call_center/call_center.py:50
· conf 1.00
[MINED108] `self._escalate_call` used but never assigned in __init__: Method `escalate_call` of class `Operator` reads `self._escalate_call`, but no assignment to it exists in __init__ (and no class-…
MINED108
self.attribute used but never assigned in __init__
CWE-476
solutions/object_oriented_design/call_center/call_center.py:59
· conf 1.00
[MINED108] `self.call` used but never assigned in __init__: Method `escalate_call` of class `Supervisor` reads `self.call`, but no assignment to it exists in __init__ (and no class-level fallback). T…
MINED108
self.attribute used but never assigned in __init__
CWE-476
solutions/object_oriented_design/call_center/call_center.py:60
· conf 1.00
[MINED108] `self._escalate_call` used but never assigned in __init__: Method `escalate_call` of class `Supervisor` reads `self._escalate_call`, but no assignment to it exists in __init__ (and no clas…
MINED108
self.attribute used but never assigned in __init__
CWE-476
solutions/object_oriented_design/call_center/call_center.py:100
· conf 1.00
[MINED108] `self._dispatch_call` used but never assigned in __init__: Method `dispatch_call` of class `CallCenter` reads `self._dispatch_call`, but no assignment to it exists in __init__ (and no clas…
MINED108
self.attribute used but never assigned in __init__
CWE-476
solutions/object_oriented_design/call_center/call_center.py:102
· conf 1.00
[MINED108] `self._dispatch_call` used but never assigned in __init__: Method `dispatch_call` of class `CallCenter` reads `self._dispatch_call`, but no assignment to it exists in __init__ (and no clas…
MINED108
self.attribute used but never assigned in __init__
CWE-476
solutions/object_oriented_design/call_center/call_center.py:104
· conf 1.00
[MINED108] `self._dispatch_call` used but never assigned in __init__: Method `dispatch_call` of class `CallCenter` reads `self._dispatch_call`, but no assignment to it exists in __init__ (and no clas…
MINED108
self.attribute used but never assigned in __init__
CWE-476
solutions/object_oriented_design/deck_of_cards/deck_of_cards.py:38
· conf 1.00
[MINED108] `self._value` used but never assigned in __init__: Method `is_ace` of class `BlackJackCard` reads `self._value`, but no assignment to it exists in __init__ (and no class-level fallback). T…
MINED108
self.attribute used but never assigned in __init__
CWE-476
solutions/object_oriented_design/deck_of_cards/deck_of_cards.py:42
· conf 1.00
[MINED108] `self._value` used but never assigned in __init__: Method `is_face_card` of class `BlackJackCard` reads `self._value`, but no assignment to it exists in __init__ (and no class-level fallba…
MINED108
self.attribute used but never assigned in __init__
CWE-476
solutions/object_oriented_design/deck_of_cards/deck_of_cards.py:46
· conf 1.00
[MINED108] `self.is_ace` used but never assigned in __init__: Method `value` of class `BlackJackCard` reads `self.is_ace`, but no assignment to it exists in __init__ (and no class-level fallback). Th…
MINED108
self.attribute used but never assigned in __init__
CWE-476
solutions/object_oriented_design/deck_of_cards/deck_of_cards.py:48
· conf 1.00
[MINED108] `self.is_face_card` used but never assigned in __init__: Method `value` of class `BlackJackCard` reads `self.is_face_card`, but no assignment to it exists in __init__ (and no class-level f…
MINED108
self.attribute used but never assigned in __init__
CWE-476
solutions/object_oriented_design/deck_of_cards/deck_of_cards.py:51
· conf 1.00
[MINED108] `self._value` used but never assigned in __init__: Method `value` of class `BlackJackCard` reads `self._value`, but no assignment to it exists in __init__ (and no class-level fallback). Th…
MINED108
self.attribute used but never assigned in __init__
CWE-476
solutions/object_oriented_design/deck_of_cards/deck_of_cards.py:56
· conf 1.00
[MINED108] `self._value` used but never assigned in __init__: Method `value` of class `BlackJackCard` reads `self._value`, but no assignment to it exists in __init__ (and no class-level fallback). Th…
MINED108
self.attribute used but never assigned in __init__
CWE-476
solutions/object_oriented_design/deck_of_cards/deck_of_cards.py:86
· conf 1.00
[MINED108] `self.possible_scores` used but never assigned in __init__: Method `score` of class `BlackJackHand` reads `self.possible_scores`, but no assignment to it exists in __init__ (and no class-l…
MINED108
self.attribute used but never assigned in __init__
CWE-476
solutions/object_oriented_design/hash_table/hash_map.py:18
· conf 1.00
[MINED108] `self._hash_function` used but never assigned in __init__: Method `set` of class `HashTable` reads `self._hash_function`, but no assignment to it exists in __init__ (and no class-level fal…
MINED108
self.attribute used but never assigned in __init__
CWE-476
solutions/object_oriented_design/hash_table/hash_map.py:26
· conf 1.00
[MINED108] `self._hash_function` used but never assigned in __init__: Method `get` of class `HashTable` reads `self._hash_function`, but no assignment to it exists in __init__ (and no class-level fal…
MINED108
self.attribute used but never assigned in __init__
CWE-476
solutions/object_oriented_design/hash_table/hash_map.py:33
· conf 1.00
[MINED108] `self._hash_function` used but never assigned in __init__: Method `remove` of class `HashTable` reads `self._hash_function`, but no assignment to it exists in __init__ (and no class-level …
MINED108
self.attribute used but never assigned in __init__
CWE-476
solutions/object_oriented_design/parking_lot/parking_lot.py:87
· conf 1.00
[MINED108] `self._find_available_spot` used but never assigned in __init__: Method `park_vehicle` of class `Level` reads `self._find_available_spot`, but no assignment to it exists in __init__ (and n…
MINED108
self.attribute used but never assigned in __init__
CWE-476
solutions/system_design/mint/mint_mapreduce.py:34
· conf 1.00
[MINED108] `self.extract_year_month` used but never assigned in __init__: Method `mapper` of class `SpendingByCategory` reads `self.extract_year_month`, but no assignment to it exists in __init__ (an…
MINED108
self.attribute used but never assigned in __init__
CWE-476
solutions/system_design/mint/mint_mapreduce.py:35
· conf 1.00
[MINED108] `self.current_year_month` used but never assigned in __init__: Method `mapper` of class `SpendingByCategory` reads `self.current_year_month`, but no assignment to it exists in __init__ (an…
MINED108
self.attribute used but never assigned in __init__
CWE-476
solutions/system_design/mint/mint_mapreduce.py:45
· conf 1.00
[MINED108] `self.handle_budget_notifications` used but never assigned in __init__: Method `reducer` of class `SpendingByCategory` reads `self.handle_budget_notifications`, but no assignment to it exi…
MINED108
self.attribute used but never assigned in __init__
CWE-476
solutions/system_design/mint/mint_mapreduce.py:51
· conf 1.00
[MINED108] `self.mr` used but never assigned in __init__: Method `steps` of class `SpendingByCategory` reads `self.mr`, but no assignment to it exists in __init__ (and no class-level fallback). This …
MINED108
self.attribute used but never assigned in __init__
CWE-476
solutions/system_design/mint/mint_mapreduce.py:51
· conf 1.00
[MINED108] `self.mapper` used but never assigned in __init__: Method `steps` of class `SpendingByCategory` reads `self.mapper`, but no assignment to it exists in __init__ (and no class-level fallback…
MINED108
self.attribute used but never assigned in __init__
CWE-476
solutions/system_design/mint/mint_mapreduce.py:52
· conf 1.00
[MINED108] `self.reducer` used but never assigned in __init__: Method `steps` of class `SpendingByCategory` reads `self.reducer`, but no assignment to it exists in __init__ (and no class-level fallba…
MINED108
self.attribute used but never assigned in __init__
CWE-476
solutions/system_design/mint/mint_snippets.py:31
· conf 1.00
[MINED108] `self.manual_overrides` used but never assigned in __init__: Method `categorize` of class `Categorizer` reads `self.manual_overrides`, but no assignment to it exists in __init__ (and no cl…
SEC029
Server-Side Request Forgery (SSRF) — outbound HTTP from user input
solutions/system_design/pastebin/pastebin.py:8
· conf 1.00
[SEC029] Server-Side Request Forgery (SSRF) — outbound HTTP from user input: Outbound HTTP request to a user-controlled URL without allowlist validation. Attackers can probe internal services (169.25…
CORE_NO_CI
No CI/CD configuration found
No CI/CD configuration found
SEC127
AI agent stub — TODO: implement / pass placeholder body
solutions/object_oriented_design/call_center/call_center.py:68
· conf 1.00
[SEC127] AI agent stub — TODO: implement / pass placeholder body: Function body left as TODO/pass/raise NotImplementedError after an AI scaffolding pass. The route appears to exist (and may even pass…
COMP001
[COMP001] High cognitive complexity: Function `load_yfinance_data` has cognitive complexity 9 (SonarSource scale). Cognitive complexity measures how hard the function is for a human to understand — nested branches, boolean chains, and recursion all weigh in. Breakdown: except=1, for=1, if=2, nested_bonus=3, or=2.
solutions/system_design/social_graph/social_graph_snippets.py:13
· conf 0.95
[COMP001] High cognitive complexity: Function `bfs` has cognitive complexity 9 (SonarSource scale). Cognitive complexity measures how hard the function is for a human to understand — nested branches,…
MINED050
Stub Only Function
CWE-1188
· conf 0.20
[MINED050] Stub Only Function (and 8 more): Same pattern found in 8 additional files. Review if needed.
MINED050
Stub Only Function
CWE-1188
solutions/object_oriented_design/call_center/call_center.py:34
· conf 1.00
[MINED050] Stub Only Function: Function declared but body is just pass, return None, raise NotImplementedError, or TODO comment.
MINED050
Stub Only Function
CWE-1188
solutions/object_oriented_design/deck_of_cards/deck_of_cards.py:24
· conf 1.00
[MINED050] Stub Only Function: Function declared but body is just pass, return None, raise NotImplementedError, or TODO comment.
MINED050
Stub Only Function
CWE-1188
solutions/object_oriented_design/lru_cache/lru_cache.py:15
· conf 1.00
[MINED050] Stub Only Function: Function declared but body is just pass, return None, raise NotImplementedError, or TODO comment.
Reading from rp.scan + rp.finding + rp.rule (unified schema, R78 series). Legacy data path unchanged. Compare with /scan/9642fd45-eaae-4159-ae42-d3a6e365cee6/.