synthesis-git-hooks
Audited by Socket on Sep 22, 2026
2 alerts found:
SecurityAnomalyThe fragment is primarily a defensive Git pre-commit scanner and does not show clear malicious intent or data exfiltration. However, it contains a high-impact command-injection vulnerability: attacker-controlled staged filenames, and potentially configuration regexes, are interpolated into an awk system() shell command without safe escaping. Replace system() with direct awk matching or a safe subprocess design, and avoid eval by using a constrained output format. The repository-local hook delegation should remain treated as executable trusted code.
This module is a commit-message policy gate that appears designed to be fail-closed and to block commits containing sensitive patterns. It does not show direct evidence of classic malware (no networking/exfiltration/destruction visible). However, it contains a high-impact dynamic execution primitive (eval of stdout from a Python sidecar) that would enable arbitrary code execution if the sidecar or its emitted output can be influenced/compromised. It also chains to a repo-local commit-msg hook via exec, expanding the execution trust boundary to repository-controlled content. Overall security risk is driven by the eval-based sidecar export mechanism and hook chaining rather than overt malicious logic in the bash fragment.