cloud-sql-postgres-replication
Audited by Socket on Apr 28, 2026
4 alerts found:
Anomalyx4No direct indicators of backdoor behavior or explicit data exfiltration exist in this wrapper code. However, it meaningfully increases risk by (1) conditionally loading a local .env file and propagating those values into the environment of an externally executed subprocess, and (2) invoking a third-party package via npx to run the requested tool, with user-supplied CLI arguments forwarded to that tool. This is a supply-chain and secret-handling concern; the security posture depends heavily on what the invoked '@toolbox-sdk/server@1.1.0' does with forwarded env/args.
This module is not an obvious malware payload; it is a wrapper that forwards environment and user arguments to an external tool executed via npx. The primary security concerns are (1) supply-chain/execution risk inherent to runtime npx invocation, (2) expansion and forwarding of potentially sensitive configuration from a local `../../../.env` into the child process, and (3) broader-than-necessary environment propagation plus slightly increased argument/interpretation ambiguity on Windows due to `shell: true`.
This is primarily a delegation/launcher module. It conditionally imports local .env values and forwards the resulting environment (and user-provided CLI arguments) to code executed via npx (@toolbox-sdk/server@1.1.0). While the fragment itself shows no explicit malicious behavior, it creates a meaningful supply-chain and secret-handling risk by running third-party code with inherited stdio and potentially sensitive configuration, and it widens argument-impact on Windows due to shell:true.
No clear in-file malware behavior is evident, but this wrapper meaningfully increases supply-chain and data-exposure risk by (1) executing a runtime `npx` package/tool invocation, (2) forwarding arbitrary user CLI arguments to that tool, and (3) conditionally loading a local `.env` file and passing its contents as environment variables to the spawned dependency. If the invoked `@toolbox-sdk/server` (or the `replication_stats` command) is compromised or overly verbose, sensitive configuration/credentials could be exposed via logs or behavior. Review and restrict what env/args are passed in sensitive environments.