Generated by HoundDog.ai on 2026-01-29 11:54:49 AM.
- Viewing This Report
- Key Terminology
- Scan Configuration
- Files Detected
- Data Elements
- Data Sinks
- Risky Dataflows
- Safe Dataflows
- Remediation Strategy
For the best viewing experience, we recommend using Google Chrome with Markdown Viewer extension. For large codebases such as monorepos, this report can be too large to render. So consider scanning a subset of the codebase, one service at a time.
Setup Instructions:
-
Install the Markdown Viewer extension in Chrome
-
Follow the instructions here to configure the extension.
-
Open this file in Chrome to view it with optimal rendering.
If you face any issues, please reach out to us at support@hounddog.ai.
-
Data Elements: Sensitive data types such as PII (Personally Identifiable Information), PHI (Protected Health Information), PIFI (Personally Identifiable Financial Information), authentication tokens, and other confidential information detected in source code.
-
Data Element Occurrences: Specific instances of sensitive data elements detected in the codebase. For example, a variable assignment
var email = 'john@example.com'is one occurrence of theemaildata element. -
Sensitivity: Data elements are assigned one of the following sensitivity levels:
- π΄ Critical (e.g., credit card numbers)
- π Medium (e.g., phone numbers)
- π‘ Low (e.g., email addresses)
Note that the presence of sensitive data alone does not necessarily indicate a privacy risk.
-
Data Sinks: Destinations where sensitive data elements are transmitted or stored, including (but not limited to) logs, databases, HTTP APIs, and third-party SDKs.
-
Data Sink Occurrences: Specific instances of data sinks detected in the codebase. For example, a function call
logger.info(user_email)is one occurrence of thelogsdata sink. -
Dataflows: The paths that sensitive data element occurrences follow through the codebase to reach data sinks.
-
Safe Dataflows: Dataflows in which the transmission or storage of sensitive data elements are either:
- Sent to destinations that are generally known to be safe (e.g., encrypted databases, internal gRPC endpoints).
- Sent to destinations that are generally considered unsafe (e.g., logs, third-party APIs), but the data element is explicitly allowlisted.
- Sanitized before reaching the sink (e.g., hashed, masked, encrypted, redacted).
-
Risky Dataflows: Vulnerable dataflows where sensitive data reaches unsafe sinks without adequate sanitization, potentially exposing it to misuse or leakage.
-
Severity: Dataflows are assigned one of the following severity levels:
- π₯ Critical
- π§ Medium
- π¨ Low
- π© Info (for safe dataflows)
The severity is determined by the highest sensitivity of the data elements exposed.
The table below shows the configuration parameters used for this scan.
| Parameter | Value |
|---|---|
| Scanner Version | dev |
| Scanner Build | dev |
Was HOUNDDOG_API_KEY provided? |
No |
| Scan Target Directory | /Users/joohwan/hounddog-workspace/hounddog-test-python-app |
| Git Source Code Manager Type | GitHub (Cloud) |
| Git Repository | hounddogai/hounddog-test-python-app |
| Git Branch | main |
| Git Commit SHA | 781c916790f5f99150244ab4e9942c13a563d2c3 |
| Ignored File Patterns | 0 |
| Ignored Data Elements | 0 |
| Ignored Data Sinks | 0 |
| Ignored Data Element Occurrences | 0 |
| Ignored Dataflows | 0 |
The table below shows the files discovered in the codebase, grouped by programming language.
| Language | File Count | Line Count |
|---|---|---|
| Markdown | 1 | 463 |
| Python | 12 | 3993 |
| TOML | 1 | 19 |
| Other | 1 | 0 |
| Total | 15 | 4475 |
The table below shows the sensitive data elements discovered in the codebase and the sinks they are exposed to. Scroll down further to see detailed information about each data element.
| Sensitivity | Data Element | Risky Sinks | Safe Sinks |
|---|---|---|---|
| π΄ Critical | Medical Condition | None | SQL Database |
| π΄ Critical | Medical History | OpenAI | SQL Database |
| π΄ Critical | Medical Record Number | None | SQL Database |
| π Medium | Blood Cholesterol | None | None |
| π Medium | Blood Pressure | None | None |
| π Medium | Blood Type | None | SQL Database |
| π Medium | Medication | None | SQL Database |
| π Medium | Phone Number | Sentry | SQL Database |
| π Medium | Sexual Orientation | None | SQL Database |
| π Medium | Vital Sign | None | None |
| π‘ Low | Date of Birth | None | SQL Database |
| π‘ Low | None | SQL Database | |
| π‘ Low | Emergency Contact | None | SQL Database |
| π‘ Low | First Name | Logs | SQL Database |
| π‘ Low | Last Name | Logs | SQL Database |
Sensitivity: π΄ Critical β’ Tags: PHI β’ Occurrences: 49
Risky Dataflows:
No risky dataflows detected
Safe Dataflows:
SQL Database
-
First detected here in utils/database.py:34:5
allergies = Column(Text)
-
Stored in SQL Database in utils/database.py:34:5
allergies = Column(Text)
Visualization:
%%{init: {'flowchart': {'curve': 'linear'}}}%%
flowchart LR
de_43("<a href='#data-element-43'>Medical Condition</a>")
style de_43 fill:none,stroke:#808080,stroke-width:1px
file_43_a5d31205d55c70dbb753118aeba456b0("<a href='https://github.com/hounddogai/hounddog-test-python-app/blob/781c916790f5/utils/database.py'>utils/database.py</a>")
style file_43_a5d31205d55c70dbb753118aeba456b0 fill:none,stroke:#808080,stroke-width:1px
de_43 --> file_43_a5d31205d55c70dbb753118aeba456b0
file_43_a5d31205d55c70dbb753118aeba456b0 --> |<a href='https://github.com/hounddogai/hounddog-test-python-app/blob/781c916790f5/utils/database.py#L34-L34'>L34</a>| sink_sql_db
sink_sql_db("<a href='#data-sink-sql-db'>SQL Database</a>")
style sink_sql_db fill:#00800026,stroke:#006400,color:#006400
Sensitivity: π΄ Critical β’ Tags: PHI β’ Occurrences: 54
Risky Dataflows:
OpenAI
-
First detected here in pages/patient.py:59:9
medical_history -
Placed inside a string and assigned to 'patient_context' in pages/patient.py:284:17
patient_context = f""" Patient Medical History: {medical_history} """
-
Wrapped in langchain_core.messages.SystemMessage and assigned to 'messages' in pages/patient.py:308:25
messages = [SystemMessage(content=patient_context)]
-
Exposed to OpenAI in pages/patient.py:321:36
llm.invoke(messages)
Safe Dataflows:
SQL Database
-
First detected here in utils/database.py:37:5
medical_history = Column(Text)
-
Stored in SQL Database in utils/database.py:37:5
medical_history = Column(Text)
Visualization:
%%{init: {'flowchart': {'curve': 'linear'}}}%%
flowchart LR
de_45("<a href='#data-element-45'>Medical History</a>")
style de_45 fill:none,stroke:#808080,stroke-width:1px
file_45_a5d31205d55c70dbb753118aeba456b0("<a href='https://github.com/hounddogai/hounddog-test-python-app/blob/781c916790f5/utils/database.py'>utils/database.py</a>")
style file_45_a5d31205d55c70dbb753118aeba456b0 fill:none,stroke:#808080,stroke-width:1px
de_45 --> file_45_a5d31205d55c70dbb753118aeba456b0
file_45_a5d31205d55c70dbb753118aeba456b0 --> |<a href='https://github.com/hounddogai/hounddog-test-python-app/blob/781c916790f5/utils/database.py#L37-L37'>L37</a>| sink_sql_db
file_45_0a6344e795897f52ee7ed6e95daf4674("<a href='https://github.com/hounddogai/hounddog-test-python-app/blob/781c916790f5/pages/patient.py'>pages/patient.py</a>")
style file_45_0a6344e795897f52ee7ed6e95daf4674 fill:none,stroke:#808080,stroke-width:1px
de_45 --> file_45_0a6344e795897f52ee7ed6e95daf4674
file_45_0a6344e795897f52ee7ed6e95daf4674 --> |<a href='https://github.com/hounddogai/hounddog-test-python-app/blob/781c916790f5/pages/patient.py#L321-L321'>L321</a>| sink_openai
sink_sql_db("<a href='#data-sink-sql-db'>SQL Database</a>")
style sink_sql_db fill:#00800026,stroke:#006400,color:#006400
sink_openai("<a href='#data-sink-openai'>OpenAI</a>")
style sink_openai fill:#FF000026,stroke:#C80000,color:#C80000
Sensitivity: π΄ Critical β’ Tags: PHI β’ Occurrences: 9
Risky Dataflows:
No risky dataflows detected
Safe Dataflows:
SQL Database
Occurrence #1
-
First detected here in utils/data_manager.py:387:69
MedicalRecord.id
-
Stored in SQL Database in utils/data_manager.py:387:58
func.count(MedicalRecord.id)
Occurrence #2
-
First detected here in utils/data_manager.py:248:45
MedicalRecord.id
-
Stored in SQL Database in utils/data_manager.py:248:34
func.count(MedicalRecord.id)
Occurrence #3
-
First detected here in utils/data_manager.py:496:54
MedicalRecord.id
-
Stored in SQL Database in utils/data_manager.py:496:43
func.count(MedicalRecord.id)
Occurrence #4
-
First detected here in utils/data_manager.py:387:69
MedicalRecord.id
-
Stored in SQL Database in utils/data_manager.py:389:32
func.count(MedicalRecord.id)
Occurrence #5
-
First detected here in utils/data_manager.py:239:45
MedicalRecord.id
-
Stored in SQL Database in utils/data_manager.py:239:34
func.count(MedicalRecord.id)
Visualization:
%%{init: {'flowchart': {'curve': 'linear'}}}%%
flowchart LR
de_47("<a href='#data-element-47'>Medical Record Number</a>")
style de_47 fill:none,stroke:#808080,stroke-width:1px
file_47_f3b82eca6148dc549059de4f35e70529("<a href='https://github.com/hounddogai/hounddog-test-python-app/blob/781c916790f5/utils/data_manager.py'>utils/data_manager.py</a>")
style file_47_f3b82eca6148dc549059de4f35e70529 fill:none,stroke:#808080,stroke-width:1px
de_47 --> file_47_f3b82eca6148dc549059de4f35e70529
file_47_f3b82eca6148dc549059de4f35e70529 --> |<a href='https://github.com/hounddogai/hounddog-test-python-app/blob/781c916790f5/utils/data_manager.py#L248-L248'>L248</a>| sink_sql_db
sink_sql_db("<a href='#data-sink-sql-db'>SQL Database</a>")
style sink_sql_db fill:#00800026,stroke:#006400,color:#006400
Sensitivity: π Medium β’ Tags: PHI β’ Occurrences: 17
Risky Dataflows:
No risky dataflows detected
Safe Dataflows:
No safe dataflows detected
Sensitivity: π Medium β’ Tags: PHI β’ Occurrences: 34
Risky Dataflows:
No risky dataflows detected
Safe Dataflows:
No safe dataflows detected
Sensitivity: π Medium β’ Tags: PHI β’ Occurrences: 50
Risky Dataflows:
No risky dataflows detected
Safe Dataflows:
SQL Database
-
First detected here in utils/database.py:33:5
blood_type = Column(String(10))
-
Stored in SQL Database in utils/database.py:33:5
blood_type = Column(String(10))
Visualization:
%%{init: {'flowchart': {'curve': 'linear'}}}%%
flowchart LR
de_10("<a href='#data-element-10'>Blood Type</a>")
style de_10 fill:none,stroke:#808080,stroke-width:1px
file_10_a5d31205d55c70dbb753118aeba456b0("<a href='https://github.com/hounddogai/hounddog-test-python-app/blob/781c916790f5/utils/database.py'>utils/database.py</a>")
style file_10_a5d31205d55c70dbb753118aeba456b0 fill:none,stroke:#808080,stroke-width:1px
de_10 --> file_10_a5d31205d55c70dbb753118aeba456b0
file_10_a5d31205d55c70dbb753118aeba456b0 --> |<a href='https://github.com/hounddogai/hounddog-test-python-app/blob/781c916790f5/utils/database.py#L33-L33'>L33</a>| sink_sql_db
sink_sql_db("<a href='#data-sink-sql-db'>SQL Database</a>")
style sink_sql_db fill:#00800026,stroke:#006400,color:#006400
Sensitivity: π Medium β’ Tags: PHI β’ Occurrences: 49
Risky Dataflows:
No risky dataflows detected
Safe Dataflows:
SQL Database
-
First detected here in utils/database.py:38:5
current_medications = Column(Text)
-
Stored in SQL Database in utils/database.py:38:5
current_medications = Column(Text)
Visualization:
%%{init: {'flowchart': {'curve': 'linear'}}}%%
flowchart LR
de_49("<a href='#data-element-49'>Medication</a>")
style de_49 fill:none,stroke:#808080,stroke-width:1px
file_49_a5d31205d55c70dbb753118aeba456b0("<a href='https://github.com/hounddogai/hounddog-test-python-app/blob/781c916790f5/utils/database.py'>utils/database.py</a>")
style file_49_a5d31205d55c70dbb753118aeba456b0 fill:none,stroke:#808080,stroke-width:1px
de_49 --> file_49_a5d31205d55c70dbb753118aeba456b0
file_49_a5d31205d55c70dbb753118aeba456b0 --> |<a href='https://github.com/hounddogai/hounddog-test-python-app/blob/781c916790f5/utils/database.py#L38-L38'>L38</a>| sink_sql_db
sink_sql_db("<a href='#data-sink-sql-db'>SQL Database</a>")
style sink_sql_db fill:#00800026,stroke:#006400,color:#006400
Sensitivity: π Medium β’ Tags: PII β’ Occurrences: 57
Risky Dataflows:
Sentry
-
First detected here in pages/patient.py:101:33
"phone": phone
-
Placed inside a dictionary and exposed to Sentry in pages/patient.py:98:21
sentry_sdk.capture_message( f"Failed to add patient", level="error", extras={"phone": phone}, )
Safe Dataflows:
SQL Database
-
First detected here in utils/database.py:30:5
phone = Column(String(50))
-
Stored in SQL Database in utils/database.py:30:5
phone = Column(String(50))
Visualization:
%%{init: {'flowchart': {'curve': 'linear'}}}%%
flowchart LR
de_60("<a href='#data-element-60'>Phone Number</a>")
style de_60 fill:none,stroke:#808080,stroke-width:1px
file_60_0a6344e795897f52ee7ed6e95daf4674("<a href='https://github.com/hounddogai/hounddog-test-python-app/blob/781c916790f5/pages/patient.py'>pages/patient.py</a>")
style file_60_0a6344e795897f52ee7ed6e95daf4674 fill:none,stroke:#808080,stroke-width:1px
de_60 --> file_60_0a6344e795897f52ee7ed6e95daf4674
file_60_0a6344e795897f52ee7ed6e95daf4674 --> |<a href='https://github.com/hounddogai/hounddog-test-python-app/blob/781c916790f5/pages/patient.py#L98-L102'>L98</a>| sink_sentry
file_60_a5d31205d55c70dbb753118aeba456b0("<a href='https://github.com/hounddogai/hounddog-test-python-app/blob/781c916790f5/utils/database.py'>utils/database.py</a>")
style file_60_a5d31205d55c70dbb753118aeba456b0 fill:none,stroke:#808080,stroke-width:1px
de_60 --> file_60_a5d31205d55c70dbb753118aeba456b0
file_60_a5d31205d55c70dbb753118aeba456b0 --> |<a href='https://github.com/hounddogai/hounddog-test-python-app/blob/781c916790f5/utils/database.py#L30-L30'>L30</a>| sink_sql_db
sink_sentry("<a href='#data-sink-sentry'>Sentry</a>")
style sink_sentry fill:#FF000026,stroke:#C80000,color:#C80000
sink_sql_db("<a href='#data-sink-sql-db'>SQL Database</a>")
style sink_sql_db fill:#00800026,stroke:#006400,color:#006400
Sensitivity: π Medium β’ Tags: PII β’ Occurrences: 127
Risky Dataflows:
No risky dataflows detected
Safe Dataflows:
SQL Database
-
First detected here in utils/database.py:29:5
gender = Column(String(50), nullable=False)
-
Stored in SQL Database in utils/database.py:29:5
gender = Column(String(50), nullable=False)
Visualization:
%%{init: {'flowchart': {'curve': 'linear'}}}%%
flowchart LR
de_73("<a href='#data-element-73'>Sexual Orientation</a>")
style de_73 fill:none,stroke:#808080,stroke-width:1px
file_73_a5d31205d55c70dbb753118aeba456b0("<a href='https://github.com/hounddogai/hounddog-test-python-app/blob/781c916790f5/utils/database.py'>utils/database.py</a>")
style file_73_a5d31205d55c70dbb753118aeba456b0 fill:none,stroke:#808080,stroke-width:1px
de_73 --> file_73_a5d31205d55c70dbb753118aeba456b0
file_73_a5d31205d55c70dbb753118aeba456b0 --> |<a href='https://github.com/hounddogai/hounddog-test-python-app/blob/781c916790f5/utils/database.py#L29-L29'>L29</a>| sink_sql_db
sink_sql_db("<a href='#data-sink-sql-db'>SQL Database</a>")
style sink_sql_db fill:#00800026,stroke:#006400,color:#006400
Sensitivity: π Medium β’ Tags: PHI β’ Occurrences: 4
Risky Dataflows:
No risky dataflows detected
Safe Dataflows:
No safe dataflows detected
Sensitivity: π‘ Low β’ Tags: PII β’ Occurrences: 79
Risky Dataflows:
No risky dataflows detected
Safe Dataflows:
SQL Database
-
First detected here in utils/database.py:28:5
date_of_birth = Column(Date, nullable=False)
-
Stored in SQL Database in utils/database.py:28:5
date_of_birth = Column(Date, nullable=False)
Visualization:
%%{init: {'flowchart': {'curve': 'linear'}}}%%
flowchart LR
de_16("<a href='#data-element-16'>Date of Birth</a>")
style de_16 fill:none,stroke:#808080,stroke-width:1px
file_16_a5d31205d55c70dbb753118aeba456b0("<a href='https://github.com/hounddogai/hounddog-test-python-app/blob/781c916790f5/utils/database.py'>utils/database.py</a>")
style file_16_a5d31205d55c70dbb753118aeba456b0 fill:none,stroke:#808080,stroke-width:1px
de_16 --> file_16_a5d31205d55c70dbb753118aeba456b0
file_16_a5d31205d55c70dbb753118aeba456b0 --> |<a href='https://github.com/hounddogai/hounddog-test-python-app/blob/781c916790f5/utils/database.py#L28-L28'>L28</a>| sink_sql_db
sink_sql_db("<a href='#data-sink-sql-db'>SQL Database</a>")
style sink_sql_db fill:#00800026,stroke:#006400,color:#006400
Sensitivity: π‘ Low β’ Tags: PII β’ Occurrences: 55
Risky Dataflows:
No risky dataflows detected
Safe Dataflows:
SQL Database
-
First detected here in utils/database.py:31:5
email = Column(String(100))
-
Stored in SQL Database in utils/database.py:31:5
email = Column(String(100))
Visualization:
%%{init: {'flowchart': {'curve': 'linear'}}}%%
flowchart LR
de_20("<a href='#data-element-20'>Email</a>")
style de_20 fill:none,stroke:#808080,stroke-width:1px
file_20_a5d31205d55c70dbb753118aeba456b0("<a href='https://github.com/hounddogai/hounddog-test-python-app/blob/781c916790f5/utils/database.py'>utils/database.py</a>")
style file_20_a5d31205d55c70dbb753118aeba456b0 fill:none,stroke:#808080,stroke-width:1px
de_20 --> file_20_a5d31205d55c70dbb753118aeba456b0
file_20_a5d31205d55c70dbb753118aeba456b0 --> |<a href='https://github.com/hounddogai/hounddog-test-python-app/blob/781c916790f5/utils/database.py#L31-L31'>L31</a>| sink_sql_db
sink_sql_db("<a href='#data-sink-sql-db'>SQL Database</a>")
style sink_sql_db fill:#00800026,stroke:#006400,color:#006400
Sensitivity: π‘ Low β’ Tags: PII β’ Occurrences: 91
Risky Dataflows:
No risky dataflows detected
Safe Dataflows:
SQL Database
-
First detected here in utils/database.py:36:5
emergency_contact_phone = Column(String(50))
-
Stored in SQL Database in utils/database.py:36:5
emergency_contact_phone = Column(String(50))
Visualization:
%%{init: {'flowchart': {'curve': 'linear'}}}%%
flowchart LR
de_21("<a href='#data-element-21'>Emergency Contact</a>")
style de_21 fill:none,stroke:#808080,stroke-width:1px
file_21_a5d31205d55c70dbb753118aeba456b0("<a href='https://github.com/hounddogai/hounddog-test-python-app/blob/781c916790f5/utils/database.py'>utils/database.py</a>")
style file_21_a5d31205d55c70dbb753118aeba456b0 fill:none,stroke:#808080,stroke-width:1px
de_21 --> file_21_a5d31205d55c70dbb753118aeba456b0
file_21_a5d31205d55c70dbb753118aeba456b0 --> |<a href='https://github.com/hounddogai/hounddog-test-python-app/blob/781c916790f5/utils/database.py#L36-L36'>L36</a>| sink_sql_db
sink_sql_db("<a href='#data-sink-sql-db'>SQL Database</a>")
style sink_sql_db fill:#00800026,stroke:#006400,color:#006400
Sensitivity: π‘ Low β’ Tags: PII β’ Occurrences: 81
Risky Dataflows:
Logs
-
First detected here in scripts/seed_db.py:143:9
first_name -
Placed inside a string and exposed to Logs in scripts/seed_db.py:168:13
logger.debug(f"Added patient: {first_name} {last_name}")
Safe Dataflows:
SQL Database
Occurrence #1
-
First detected here in utils/database.py:26:5
first_name = Column(String(100), nullable=False)
-
Stored in SQL Database in utils/database.py:26:5
first_name = Column(String(100), nullable=False)
Occurrence #2
-
First detected here in utils/data_manager.py:102:33
Patient.first_name
-
Stored in SQL Database in utils/data_manager.py:102:22
func.lower(Patient.first_name)
Visualization:
%%{init: {'flowchart': {'curve': 'linear'}}}%%
flowchart LR
de_27("<a href='#data-element-27'>First Name</a>")
style de_27 fill:none,stroke:#808080,stroke-width:1px
file_27_a5d31205d55c70dbb753118aeba456b0("<a href='https://github.com/hounddogai/hounddog-test-python-app/blob/781c916790f5/utils/database.py'>utils/database.py</a>")
style file_27_a5d31205d55c70dbb753118aeba456b0 fill:none,stroke:#808080,stroke-width:1px
de_27 --> file_27_a5d31205d55c70dbb753118aeba456b0
file_27_a5d31205d55c70dbb753118aeba456b0 --> |<a href='https://github.com/hounddogai/hounddog-test-python-app/blob/781c916790f5/utils/database.py#L26-L26'>L26</a>| sink_sql_db
file_27_f3b82eca6148dc549059de4f35e70529("<a href='https://github.com/hounddogai/hounddog-test-python-app/blob/781c916790f5/utils/data_manager.py'>utils/data_manager.py</a>")
style file_27_f3b82eca6148dc549059de4f35e70529 fill:none,stroke:#808080,stroke-width:1px
de_27 --> file_27_f3b82eca6148dc549059de4f35e70529
file_27_f3b82eca6148dc549059de4f35e70529 --> |<a href='https://github.com/hounddogai/hounddog-test-python-app/blob/781c916790f5/utils/data_manager.py#L102-L102'>L102</a>| sink_sql_db
file_27_1494986c7747c28afab49b7804e0927c("<a href='https://github.com/hounddogai/hounddog-test-python-app/blob/781c916790f5/scripts/seed_db.py'>scripts/seed_db.py</a>")
style file_27_1494986c7747c28afab49b7804e0927c fill:none,stroke:#808080,stroke-width:1px
de_27 --> file_27_1494986c7747c28afab49b7804e0927c
file_27_1494986c7747c28afab49b7804e0927c --> |<a href='https://github.com/hounddogai/hounddog-test-python-app/blob/781c916790f5/scripts/seed_db.py#L168-L168'>L168</a>| sink_logs
sink_logs("<a href='#data-sink-logs'>Logs</a>")
style sink_logs fill:#FF000026,stroke:#C80000,color:#C80000
sink_sql_db("<a href='#data-sink-sql-db'>SQL Database</a>")
style sink_sql_db fill:#00800026,stroke:#006400,color:#006400
Sensitivity: π‘ Low β’ Tags: PII β’ Occurrences: 78
Risky Dataflows:
Logs
-
First detected here in scripts/seed_db.py:144:9
last_name -
Placed inside a string and exposed to Logs in scripts/seed_db.py:168:13
logger.debug(f"Added patient: {first_name} {last_name}")
Safe Dataflows:
SQL Database
Occurrence #1
-
First detected here in utils/data_manager.py:103:35
Patient.last_name
-
Stored in SQL Database in utils/data_manager.py:103:24
func.lower(Patient.last_name)
Occurrence #2
-
First detected here in utils/database.py:27:5
last_name = Column(String(100), nullable=False)
-
Stored in SQL Database in utils/database.py:27:5
last_name = Column(String(100), nullable=False)
Visualization:
%%{init: {'flowchart': {'curve': 'linear'}}}%%
flowchart LR
de_37("<a href='#data-element-37'>Last Name</a>")
style de_37 fill:none,stroke:#808080,stroke-width:1px
file_37_a5d31205d55c70dbb753118aeba456b0("<a href='https://github.com/hounddogai/hounddog-test-python-app/blob/781c916790f5/utils/database.py'>utils/database.py</a>")
style file_37_a5d31205d55c70dbb753118aeba456b0 fill:none,stroke:#808080,stroke-width:1px
de_37 --> file_37_a5d31205d55c70dbb753118aeba456b0
file_37_a5d31205d55c70dbb753118aeba456b0 --> |<a href='https://github.com/hounddogai/hounddog-test-python-app/blob/781c916790f5/utils/database.py#L27-L27'>L27</a>| sink_sql_db
file_37_f3b82eca6148dc549059de4f35e70529("<a href='https://github.com/hounddogai/hounddog-test-python-app/blob/781c916790f5/utils/data_manager.py'>utils/data_manager.py</a>")
style file_37_f3b82eca6148dc549059de4f35e70529 fill:none,stroke:#808080,stroke-width:1px
de_37 --> file_37_f3b82eca6148dc549059de4f35e70529
file_37_f3b82eca6148dc549059de4f35e70529 --> |<a href='https://github.com/hounddogai/hounddog-test-python-app/blob/781c916790f5/utils/data_manager.py#L103-L103'>L103</a>| sink_sql_db
file_37_1494986c7747c28afab49b7804e0927c("<a href='https://github.com/hounddogai/hounddog-test-python-app/blob/781c916790f5/scripts/seed_db.py'>scripts/seed_db.py</a>")
style file_37_1494986c7747c28afab49b7804e0927c fill:none,stroke:#808080,stroke-width:1px
de_37 --> file_37_1494986c7747c28afab49b7804e0927c
file_37_1494986c7747c28afab49b7804e0927c --> |<a href='https://github.com/hounddogai/hounddog-test-python-app/blob/781c916790f5/scripts/seed_db.py#L168-L168'>L168</a>| sink_logs
sink_logs("<a href='#data-sink-logs'>Logs</a>")
style sink_logs fill:#FF000026,stroke:#C80000,color:#C80000
sink_sql_db("<a href='#data-sink-sql-db'>SQL Database</a>")
style sink_sql_db fill:#00800026,stroke:#006400,color:#006400
This section lists the data sinks detected and the data elements exposed to them.
Risky Dataflows:
No risky dataflows detected
Safe Dataflows:
No safe dataflows detected
Risky Dataflows:
No risky dataflows detected
Safe Dataflows:
No safe dataflows detected
Risky Dataflows:
No risky dataflows detected
Safe Dataflows:
No safe dataflows detected
Risky Dataflows:
No risky dataflows detected
Safe Dataflows:
No safe dataflows detected
Risky Dataflows:
π‘ First Name
-
First detected here in scripts/seed_db.py:143:9
first_name -
Placed inside a string and exposed to Logs in scripts/seed_db.py:168:13
logger.debug(f"Added patient: {first_name} {last_name}")
π‘ Last Name
-
First detected here in scripts/seed_db.py:144:9
last_name -
Placed inside a string and exposed to Logs in scripts/seed_db.py:168:13
logger.debug(f"Added patient: {first_name} {last_name}")
Safe Dataflows:
No safe dataflows detected
Risky Dataflows:
π΄ Medical History
-
First detected here in pages/patient.py:59:9
medical_history -
Placed inside a string and assigned to 'patient_context' in pages/patient.py:284:17
patient_context = f""" Patient Medical History: {medical_history} """
-
Wrapped in langchain_core.messages.SystemMessage and assigned to 'messages' in pages/patient.py:308:25
messages = [SystemMessage(content=patient_context)]
-
Exposed to OpenAI in pages/patient.py:321:36
llm.invoke(messages)
Safe Dataflows:
No safe dataflows detected
Risky Dataflows:
No risky dataflows detected
Safe Dataflows:
π΄ Medical Condition
-
First detected here in utils/database.py:34:5
allergies = Column(Text)
-
Stored in SQL Database in utils/database.py:34:5
allergies = Column(Text)
π΄ Medical History
-
First detected here in utils/database.py:37:5
medical_history = Column(Text)
-
Stored in SQL Database in utils/database.py:37:5
medical_history = Column(Text)
π΄ Medical Record Number
Occurrence #1
-
First detected here in utils/data_manager.py:387:69
MedicalRecord.id
-
Stored in SQL Database in utils/data_manager.py:387:58
func.count(MedicalRecord.id)
Occurrence #2
-
First detected here in utils/data_manager.py:248:45
MedicalRecord.id
-
Stored in SQL Database in utils/data_manager.py:248:34
func.count(MedicalRecord.id)
Occurrence #3
-
First detected here in utils/data_manager.py:496:54
MedicalRecord.id
-
Stored in SQL Database in utils/data_manager.py:496:43
func.count(MedicalRecord.id)
Occurrence #4
-
First detected here in utils/data_manager.py:387:69
MedicalRecord.id
-
Stored in SQL Database in utils/data_manager.py:389:32
func.count(MedicalRecord.id)
Occurrence #5
-
First detected here in utils/data_manager.py:239:45
MedicalRecord.id
-
Stored in SQL Database in utils/data_manager.py:239:34
func.count(MedicalRecord.id)
π Blood Type
-
First detected here in utils/database.py:33:5
blood_type = Column(String(10))
-
Stored in SQL Database in utils/database.py:33:5
blood_type = Column(String(10))
π Medication
-
First detected here in utils/database.py:38:5
current_medications = Column(Text)
-
Stored in SQL Database in utils/database.py:38:5
current_medications = Column(Text)
π Phone Number
-
First detected here in utils/database.py:30:5
phone = Column(String(50))
-
Stored in SQL Database in utils/database.py:30:5
phone = Column(String(50))
π Sexual Orientation
-
First detected here in utils/database.py:29:5
gender = Column(String(50), nullable=False)
-
Stored in SQL Database in utils/database.py:29:5
gender = Column(String(50), nullable=False)
π‘ Date of Birth
-
First detected here in utils/database.py:28:5
date_of_birth = Column(Date, nullable=False)
-
Stored in SQL Database in utils/database.py:28:5
date_of_birth = Column(Date, nullable=False)
π‘ Email
-
First detected here in utils/database.py:31:5
email = Column(String(100))
-
Stored in SQL Database in utils/database.py:31:5
email = Column(String(100))
π‘ Emergency Contact
-
First detected here in utils/database.py:36:5
emergency_contact_phone = Column(String(50))
-
Stored in SQL Database in utils/database.py:36:5
emergency_contact_phone = Column(String(50))
π‘ First Name
Occurrence #1
-
First detected here in utils/database.py:26:5
first_name = Column(String(100), nullable=False)
-
Stored in SQL Database in utils/database.py:26:5
first_name = Column(String(100), nullable=False)
Occurrence #2
-
First detected here in utils/data_manager.py:102:33
Patient.first_name
-
Stored in SQL Database in utils/data_manager.py:102:22
func.lower(Patient.first_name)
π‘ Last Name
Occurrence #1
-
First detected here in utils/data_manager.py:103:35
Patient.last_name
-
Stored in SQL Database in utils/data_manager.py:103:24
func.lower(Patient.last_name)
Occurrence #2
-
First detected here in utils/database.py:27:5
last_name = Column(String(100), nullable=False)
-
Stored in SQL Database in utils/database.py:27:5
last_name = Column(String(100), nullable=False)
Risky Dataflows:
No risky dataflows detected
Safe Dataflows:
No safe dataflows detected
Risky Dataflows:
π Phone Number
-
First detected here in pages/patient.py:101:33
"phone": phone
-
Placed inside a dictionary and exposed to Sentry in pages/patient.py:98:21
sentry_sdk.capture_message( f"Failed to add patient", level="error", extras={"phone": phone}, )
Safe Dataflows:
No safe dataflows detected
Risky Dataflows:
No risky dataflows detected
Safe Dataflows:
No safe dataflows detected
This section shows vulnerable dataflows where sensitive data reaches unsafe sinks without adequate sanitization.
π₯ CRITICAL: Medical History exposed to OpenAI in pages/patient.py:321:36:
llm.invoke(messages)View Details
This issue was rated as π₯ CRITICAL for exposing the following data element(s) to OpenAI:
π΄ Medical History
-
First detected here in pages/patient.py:59:9
medical_history -
Placed inside a string and assigned to 'patient_context' in pages/patient.py:284:17
patient_context = f""" Patient Medical History: {medical_history} """
-
Wrapped in langchain_core.messages.SystemMessage and assigned to 'messages' in pages/patient.py:308:25
messages = [SystemMessage(content=patient_context)]
-
Exposed to OpenAI in pages/patient.py:321:36
llm.invoke(messages)
Remediation:
Remove the offending code or sanitize the data.
For auto-closing vulnerabilities, see https://docs.hounddog.ai/scanner/remediation.
Compliance Frameworks: CWE-201, A01:2021, GDPR-A5-28, CCPA, HIPAA, NIST-800-53
π§ MEDIUM: Phone Number exposed to Sentry in pages/patient.py:98:21:
sentry_sdk.capture_message(
f"Failed to add patient",
level="error",
extras={"phone": phone},
)View Details
This issue was rated as π§ MEDIUM for exposing the following data element(s) to Sentry:
π Phone Number
-
First detected here in pages/patient.py:101:33
"phone": phone
-
Placed inside a dictionary and exposed to Sentry in pages/patient.py:98:21
sentry_sdk.capture_message( f"Failed to add patient", level="error", extras={"phone": phone}, )
Remediation:
Remove the offending code or sanitize the data.
For auto-closing vulnerabilities, see https://docs.hounddog.ai/scanner/remediation.
Compliance Frameworks: CWE-201, A01:2021, GDPR-A5-28, CCPA, NIST-800-53
π¨ LOW: First Name and Last Name exposed to Logs in scripts/seed_db.py:168:13:
logger.debug(f"Added patient: {first_name} {last_name}")View Details
This issue was rated as π¨ LOW for exposing the following data element(s) to Logs:
π‘ First Name
-
First detected here in scripts/seed_db.py:143:9
first_name -
Placed inside a string and exposed to Logs in scripts/seed_db.py:168:13
logger.debug(f"Added patient: {first_name} {last_name}")
π‘ Last Name
-
First detected here in scripts/seed_db.py:144:9
last_name -
Placed inside a string and exposed to Logs in scripts/seed_db.py:168:13
logger.debug(f"Added patient: {first_name} {last_name}")
Remediation:
Remove the offending code or sanitize the data.
For auto-closing vulnerabilities, see https://docs.hounddog.ai/scanner/remediation.
Compliance Frameworks: CWE-532, A09:2021, GDPR-A5-32, CCPA, NIST-800-53
This section shows dataflows where sensitive data reaches safe sinks or is properly sanitized.
π© INFO: First Name stored in SQL Database in utils/database.py:26:5:
first_name = Column(String(100), nullable=False)View Details
This issue was rated as π© INFO for exposing the following data element(s) to SQL Database:
π‘ First Name
-
First detected here in utils/database.py:26:5
first_name = Column(String(100), nullable=False)
-
Stored in SQL Database in utils/database.py:26:5
first_name = Column(String(100), nullable=False)
π© INFO: Medical Record Number stored in SQL Database in utils/data_manager.py:387:58:
func.count(MedicalRecord.id)View Details
This issue was rated as π© INFO for exposing the following data element(s) to SQL Database:
π΄ Medical Record Number
-
First detected here in utils/data_manager.py:387:69
MedicalRecord.id
-
Stored in SQL Database in utils/data_manager.py:387:58
func.count(MedicalRecord.id)
π© INFO: Date of Birth stored in SQL Database in utils/database.py:28:5:
date_of_birth = Column(Date, nullable=False)View Details
This issue was rated as π© INFO for exposing the following data element(s) to SQL Database:
π‘ Date of Birth
-
First detected here in utils/database.py:28:5
date_of_birth = Column(Date, nullable=False)
-
Stored in SQL Database in utils/database.py:28:5
date_of_birth = Column(Date, nullable=False)
π© INFO: Medical Record Number stored in SQL Database in utils/data_manager.py:248:34:
func.count(MedicalRecord.id)View Details
This issue was rated as π© INFO for exposing the following data element(s) to SQL Database:
π΄ Medical Record Number
-
First detected here in utils/data_manager.py:248:45
MedicalRecord.id
-
Stored in SQL Database in utils/data_manager.py:248:34
func.count(MedicalRecord.id)
π© INFO: Medical Record Number stored in SQL Database in utils/data_manager.py:496:43:
func.count(MedicalRecord.id)View Details
This issue was rated as π© INFO for exposing the following data element(s) to SQL Database:
π΄ Medical Record Number
-
First detected here in utils/data_manager.py:496:54
MedicalRecord.id
-
Stored in SQL Database in utils/data_manager.py:496:43
func.count(MedicalRecord.id)
π© INFO: Medical Condition stored in SQL Database in utils/database.py:34:5:
allergies = Column(Text)View Details
This issue was rated as π© INFO for exposing the following data element(s) to SQL Database:
π΄ Medical Condition
-
First detected here in utils/database.py:34:5
allergies = Column(Text)
-
Stored in SQL Database in utils/database.py:34:5
allergies = Column(Text)
π© INFO: First Name stored in SQL Database in utils/data_manager.py:102:22:
func.lower(Patient.first_name)View Details
This issue was rated as π© INFO for exposing the following data element(s) to SQL Database:
π‘ First Name
-
First detected here in utils/data_manager.py:102:33
Patient.first_name
-
Stored in SQL Database in utils/data_manager.py:102:22
func.lower(Patient.first_name)
π© INFO: Medical Record Number stored in SQL Database in utils/data_manager.py:389:32:
func.count(MedicalRecord.id)View Details
This issue was rated as π© INFO for exposing the following data element(s) to SQL Database:
π΄ Medical Record Number
-
First detected here in utils/data_manager.py:387:69
MedicalRecord.id
-
Stored in SQL Database in utils/data_manager.py:389:32
func.count(MedicalRecord.id)
π© INFO: Medical Record Number stored in SQL Database in utils/data_manager.py:239:34:
func.count(MedicalRecord.id)View Details
This issue was rated as π© INFO for exposing the following data element(s) to SQL Database:
π΄ Medical Record Number
-
First detected here in utils/data_manager.py:239:45
MedicalRecord.id
-
Stored in SQL Database in utils/data_manager.py:239:34
func.count(MedicalRecord.id)
π© INFO: Last Name stored in SQL Database in utils/data_manager.py:103:24:
func.lower(Patient.last_name)View Details
This issue was rated as π© INFO for exposing the following data element(s) to SQL Database:
π‘ Last Name
-
First detected here in utils/data_manager.py:103:35
Patient.last_name
-
Stored in SQL Database in utils/data_manager.py:103:24
func.lower(Patient.last_name)
π© INFO: Phone Number stored in SQL Database in utils/database.py:30:5:
phone = Column(String(50))View Details
This issue was rated as π© INFO for exposing the following data element(s) to SQL Database:
π Phone Number
-
First detected here in utils/database.py:30:5
phone = Column(String(50))
-
Stored in SQL Database in utils/database.py:30:5
phone = Column(String(50))
π© INFO: Medical History stored in SQL Database in utils/database.py:37:5:
medical_history = Column(Text)View Details
This issue was rated as π© INFO for exposing the following data element(s) to SQL Database:
π΄ Medical History
-
First detected here in utils/database.py:37:5
medical_history = Column(Text)
-
Stored in SQL Database in utils/database.py:37:5
medical_history = Column(Text)
π© INFO: Emergency Contact stored in SQL Database in utils/database.py:36:5:
emergency_contact_phone = Column(String(50))View Details
This issue was rated as π© INFO for exposing the following data element(s) to SQL Database:
π‘ Emergency Contact
-
First detected here in utils/database.py:36:5
emergency_contact_phone = Column(String(50))
-
Stored in SQL Database in utils/database.py:36:5
emergency_contact_phone = Column(String(50))
π© INFO: Blood Type stored in SQL Database in utils/database.py:33:5:
blood_type = Column(String(10))View Details
This issue was rated as π© INFO for exposing the following data element(s) to SQL Database:
π Blood Type
-
First detected here in utils/database.py:33:5
blood_type = Column(String(10))
-
Stored in SQL Database in utils/database.py:33:5
blood_type = Column(String(10))
π© INFO: Email stored in SQL Database in utils/database.py:31:5:
email = Column(String(100))View Details
This issue was rated as π© INFO for exposing the following data element(s) to SQL Database:
π‘ Email
-
First detected here in utils/database.py:31:5
email = Column(String(100))
-
Stored in SQL Database in utils/database.py:31:5
email = Column(String(100))
π© INFO: Medication stored in SQL Database in utils/database.py:38:5:
current_medications = Column(Text)View Details
This issue was rated as π© INFO for exposing the following data element(s) to SQL Database:
π Medication
-
First detected here in utils/database.py:38:5
current_medications = Column(Text)
-
Stored in SQL Database in utils/database.py:38:5
current_medications = Column(Text)
π© INFO: Last Name stored in SQL Database in utils/database.py:27:5:
last_name = Column(String(100), nullable=False)View Details
This issue was rated as π© INFO for exposing the following data element(s) to SQL Database:
π‘ Last Name
-
First detected here in utils/database.py:27:5
last_name = Column(String(100), nullable=False)
-
Stored in SQL Database in utils/database.py:27:5
last_name = Column(String(100), nullable=False)
π© INFO: Sexual Orientation stored in SQL Database in utils/database.py:29:5:
gender = Column(String(50), nullable=False)View Details
This issue was rated as π© INFO for exposing the following data element(s) to SQL Database:
π Sexual Orientation
-
First detected here in utils/database.py:29:5
gender = Column(String(50), nullable=False)
-
Stored in SQL Database in utils/database.py:29:5
gender = Column(String(50), nullable=False)
Avoid sending sensitive data to unsafe data sinks, even during development and testing. For third parties, the shared data must align with your privacy notice and data processing agreement. Adjust or restrict sharing as necessary to maintain compliance and minimize privacy risks. For more straightforward sinks like logs, the recommendation is to remove the offending code entirely. For auto-closing vulnerabilities, see https://docs.hounddog.ai/scanner/remediation.