Tainted flow: 'p' from os.environ.get (line 83, credential/environment) → open (file write)
- Category
- Data Flow
- Confidence
- 65% confidence
- Finding
Data from a source is assigned to a variable that is later passed to a sink, creating a variable-mediated taint flow.
- Content
python out_dir = resolve_output_dir(out_dir) # ★ 写入点重新校验(防被污染) os.makedirs(out_dir, exist_ok=True) p = os.path.join(out_dir, INDEX_NAME) with open(p, "w", encoding="utf-8") as f: json.dump(index, f, ensure_ascii=False, indent=2)
