T09 · Insecure Skill Coding Practices
- Location
runtime.py:60- Finding
Path Traversal Through an Unvalidated Brief Slug
- Content
View full analysis
Path: return workspace_root / "content-production" / "drafts" / f"{slug}-article.md" def writing_pack_md_path(workspace_root: Path, slug: str) -> Path: return workspace_root / "content-production" / "drafts" / f"{slug}-writing-pack.md" def writing_pack_json_path(workspace_root: Path, slug: str) -> Path: return workspace_root / "content-production" / "drafts" / f"{slug}-writing-pack.json" def review_trace_path(workspace_root: Path, slug: str) -> Path: return workspace_root / "content-production" / "drafts" / f"{slug}-review-trace.json" ``` Those paths are subsequently used as file-write destinations: ```python article_path = article_output_path(workspace_root, brief["slug"]) pack_md_path = writing_pack_md_path(workspace_root, brief["slug"]) pack_json_path = writing_pack_json_path(workspace_root, brief["slug"]) trace_path = review_trace_path(workspace_root, brief["slug"]) notice_path = quality_gate_path(workspace_root, date=brief["date"], slug=brief["slug"]) write_text(article_path, best_article) write_text(pack_md_path, build_writing_pack_markdown(package, best_judge)) dump_json(pack_json_path, package) dump_json( trace_path, { "slug": brief["slug"], "topic": brief["topic"], "source_path": brief["source_path"], "publish_ready": p ...[truncated 2817 chars]- Remediation
View remediation
