T09 · Insecure Skill Coding Practices
- Location
scripts/wb_health_check.py:509- Finding
Absolute Backup Path Disclosed in Generated Markdown Report
- Content
View full analysis
Vulnerability Details
File Location:
scripts/wb_health_check.py, lines 509–511
Vulnerability Type: Local filesystem metadata disclosure
Risk Level: LowComplete Code Snippet
python if zip_path: lines.append(f"## 校验对象") lines.append(f"- 备份包:`{zip_path}`")Technical Analysis
find_latest_golden()returns the full path of the selected backup archive, andrender_md()writes that path verbatim into the Markdown report. The value can contain a username, mounted-volume name, custom backup location, organizational directory names, or other local filesystem metadata.This contradicts the privacy guarantee in
SKILL.md, which states that reports do not contain backup package paths and display only filenames. The full path is unnecessary for reporting backup freshness or integrity, so its disclosure exceeds the minimum data required for the Skill's declared functionality.The project contains no automatic network transmission. Exploitation therefore depends on the generated report subsequently being shared, archived in a less trusted location, or synchronized by another system.
Attack Path
- A user runs the health-check script.
find_latest_golden()identifies a backup archive and returns its full local path.render_md()embeds the unredacted path in the generated Markdown report.- The report is shared, uploaded, synchronized, or made accessible to another user.
- The recipient learns local filesystem metadata that the Skill claims not to disclose.
Impact Assessment
This issue does not grant code execution, additional system privileges, credential access, or direct remote access. Its scope is limited to confidentiality of local path metadata present in the report. Depending on directory naming, the disclosure may reveal a local username, storage layout, project or organization names, or backup-management conventions.
- Remediation
View remediation
Remediation Suggestions
Replace the absolute path with the archive's basename:
python if zip_path: lines.append("## 校验对象") lines.append(f"- 备份包:`{os.path.basename(zip_path)}`")Additionally:
- Add tests using a distinctive temporary absolute path and assert that neither the full path nor its parent directories appear in Markdown or JSON output.
- Assert that the user's home directory is absent from all generated reports.
- Centralize report sanitization so future path-bearing fields are reduced to filenames or approved relative identifiers.
- Update the privacy test to validate report contents dynamically rather than merely checking for selected source-code strings.
