best-practice-search
Fail
Audited by Gen Agent Trust Hub on Feb 17, 2026
Risk Level: HIGHDATA_EXFILTRATIONPROMPT_INJECTIONCOMMAND_EXECUTION
Full Analysis
- [DATA_EXFILTRATION] (HIGH): Arbitrary file read via unvalidated
docs_dirparameter.\n - The
searchfunction inrun.pyaccepts adocs_dirargument from the inputargswith a default value of 'docs'.\n - This path is passed directly to
subprocess.runas an argument forgrepand subsequently used inPath.read_text().\n - Lack of path validation or sandboxing allows an attacker to specify sensitive directories (e.g.,
/etc,~/.ssh) as the search target.\n - Matched files have their first 2000 characters read and returned to the caller, potentially exposing secrets, credentials, or system configurations.\n- [PROMPT_INJECTION] (LOW): Indirect Prompt Injection Surface.\n
- Ingestion points: Untrusted data enters the agent context through
tavily_search(web results) andPath.read_text()(local file contents) inrun.py.\n - Boundary markers: Absent. The
synthesis_promptinterpolates retrieved data directly into a request for the LLM to summarize and organize the information.\n - Capability inventory: The skill has the capability to execute system commands (
grep), read files, and perform network requests via the Tavily API.\n - Sanitization: There is no evidence of sanitization, filtering, or escaping of the ingested content before it is included in the prompt for the next stage of processing.\n- [COMMAND_EXECUTION] (LOW): Usage of
subprocess.runwith system binaries.\n - The script relies on the external
greputility. While it correctly avoidsshell=True, using system commands on user-provided directory paths increases the attack surface for file system exploration.
Recommendations
- AI detected serious security threats
Audit Metadata