T09 · Insecure Skill Coding Practices
- Location
scripts/generate_report.py:53- Finding
Unrestricted Chart Paths Allow Arbitrary Local File Disclosure Through Base64 Embedding
- Content
View full analysis
') ``` ### Technical Analysis Embedding generated charts as Base64 is consistent with the declared requirement to produce portable HTML reports. The encoding itself is therefore not evidence of a covert channel. However, `b64img()` accepts any regular file path supplied through the data JSON. It does not verify that the file: - Is located in the expected chart-output directory. - Has a permitted filename. - Is a genuine PNG image. - Was created by the current pipeline execution. - Is not a symbolic link. - Falls below a safe size limit. The `data:image/png` prefix does not validate or transform the underlying content. Any readable file is loaded in full, Base64-encoded, and written into the HTML source. This exceeds the minimum filesystem access required to embed the four charts. Because `generate_report.py` accepts an arbitrary JSON file as a positional argument, an attacker who can influence that file can make the process read files available under the agent's operating-system privileges. ### Attack Path 1. The attacker supplies or modifies a pipeline JSON document. 2. A chart entry is changed to reference a sensitive local file: ```json { ...[truncated 1441 chars]- Remediation
View remediation
