Secure Environment File Writer
secure_env_writerWrites environment variables to .env files on remote servers via SSH, with path traversal protection and zero-knowledge output.
Instructions
Writes environment variables to a .env file on the remote server via SSH after path normalization.
Security guarantees:
Path validation using path.resolve normalization to prevent path traversal
Heredoc writing to prevent shell expansion
Zero-knowledge output (never returns or echoes secret values back)
Blocks write attempts to system paths (/etc, /root, etc.)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| env_vars | Yes | Key-value pairs of environment variables to write | |
| file_path | Yes | Absolute path on remote server for .env file (e.g. '/var/www/myapp/.env') |