T09 · Insecure Skill Coding Practices
- Location
scripts/extract_rides_gateway.py:98- Finding
Untrusted Email Content Can Manipulate Model-Extracted Ride Records
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This skill is mostly coherent and local-first, but it handles sensitive Gmail ride receipts through model extraction and CSV export without enough validation or output neutralization.
Install only if you are comfortable granting the skill access to ride receipt emails and storing raw receipt HTML locally. Keep the generated JSON, SQLite, and CSV files private, delete raw emails.json when finished, and be cautious opening or sharing the CSV until formula neutralization and stricter extraction validation are added.
scripts/extract_rides_gateway.py:98Untrusted Email Content Can Manipulate Model-Extracted Ride Records
scripts/export_anonymized_rides_csv.py:166Model-Derived Values Are Exported Without Spreadsheet Formula Neutralization
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
},
method='POST',
)
with urllib.request.urlopen(req, timeout=timeout) as resp:
body = json.loads(resp.read().decode('utf-8'))
for item in body.get('output', []):
if item.get('type') == 'message':
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
last_err = None
for attempt in range(1, retries + 1):
try:
out = subprocess.check_output(cmd, text=True, stderr=subprocess.STDOUT)
return json.loads(out)
except subprocess.CalledProcessError as e:
last_err = e
The script fetches full Gmail message content, including HTML bodies and metadata, and writes it to a local JSON file without any consent prompt, warning, redaction, or minimization. Because ride receipts can contain sensitive personal and financial information, this creates a real privacy and data-handling risk if the output file is stored insecurely, shared, or processed by other tools.
The code writes a CSV to a user-specified path and creates parent directories if needed, which is a file-system side effect involving potentially sensitive ride data. Although the filename and docstring mention export, there is no explicit confirmation prompt or user-facing warning in the code about writing data to disk.
No suspicious patterns detected.