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.pyfile utilizes theexec()andcompile()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.pyfile usessubprocess.run()to invoke the query runner during automated testing, which involves spawning external shell processes. - [EXTERNAL_DOWNLOADS]: Both
scripts/query.pyandscripts/test_query.pyspecify external dependencies in their PEP 723 headers, specificallytoon-formatandpytest, which are retrieved from public package registries at runtime.
Audit Metadata