polywave
Audited by Socket on Jun 16, 2026
3 alerts found:
Anomalyx3This fragment is primarily a configuration for broad pre/post execution of a local script for all tool invocations. While it does not directly show malicious code, it introduces a meaningful supply-chain/integrity risk: it executes an environment-derived path under a user-writable directory ($HOME/.codex by default) without validation. If that hook script or directory is tampered with, it could enable arbitrary code execution and potential collection of sensitive tool payloads. Malware is not evidenced in this snippet alone; the main risk is the execution of an external, dynamically resolved script and the likely recording of tool data.
This module is a hook configuration that automatically executes a local script (pre_tool_use_audit) before and after all tool-use events. The highest concern is that the executable path is resolved from CODEX_HOME or a $HOME/.codex fallback—typically user-writable—without any integrity verification in this fragment. While the intent appears to be auditing/recording payloads, the configuration creates a strong arbitrary code execution and sensitive-data recording risk if the target script (or its directory) is tampered with or if CODEX_HOME is attacker-influenced.
This fragment is a tool-driven patch request that instructs apply_patch to write to an absolute /tmp path outside the expected workspace scope. While the content written ('blocked') appears harmless and there is no explicit network/credential/exec behavior shown, the out-of-scope filesystem write pattern is a notable security red flag indicating potential sandbox escape, sabotage, or unwanted artifact staging by supply-chain tooling. Additional context is needed to confirm whether this is blocked by safeguards or part of a larger malicious sequence.