skills/cnife/skills/pi-session-query/Gen Agent Trust Hub

pi-session-query

Warn

Audited by Gen Agent Trust Hub on Jul 24, 2026

Risk Level: MEDIUMREMOTE_CODE_EXECUTIONCOMMAND_EXECUTIONDATA_EXFILTRATIONEXTERNAL_DOWNLOADS
Full Analysis
  • [REMOTE_CODE_EXECUTION]: The scripts/query.py file utilizes the exec() and compile() functions to run arbitrary Python code provided via command-line arguments, file paths, or standard input. This allows for the execution of dynamic scripts within the runner's namespace without isolation.
  • [DATA_EXFILTRATION]: The skill is designed to locate, read, and process session logs within the ~/.pi/agent/sessions/ directory. These logs contain sensitive conversation history, timestamps, and model metadata that could be exposed if the analysis scripts are misused.
  • [COMMAND_EXECUTION]: The scripts/test_query.py file uses subprocess.run() to invoke the query runner during automated testing, which involves spawning external shell processes.
  • [EXTERNAL_DOWNLOADS]: Both scripts/query.py and scripts/test_query.py specify external dependencies in their PEP 723 headers, specifically toon-format and pytest, which are retrieved from public package registries at runtime.
Audit Metadata
Risk Level
MEDIUM
Analyzed
Jul 24, 2026, 02:56 AM
Security Audit — agent-trust-hub — pi-session-query