subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
# the filename should be like "agent/treecle/memory/top_of_mind.md" # so we download it to a temp path then read and serve it tmp_path = f"/tmp/{os.path.basename(filename)}" subprocess.run(["uv", "tool", "run", "fulcra-api", "file", "download", filename, tmp_path], check=True, capture_output=True) with open(tmp_path, 'rb') as f: content = f.read()- Confidence
- 93% confidence
- Finding
- subprocess.run(["uv", "tool", "run", "fulcra-api", "file", "download", filename, tmp_path], check=True, capture_output=True)
