Documentation
¶
Overview ¶
Package envfilter implements environment variable filtering for remote exec.
The C hook library sets MPROXY_CHANGED_ENVS with the names of variables that were added or modified after the hook was loaded. These are always forwarded. Other variables are filtered through configurable keep/remove patterns (similar to sudo's env_keep).
Patterns are either globs (filepath.Match syntax) or regexes delimited by slashes (e.g. /^AWS_/).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Filter ¶
Filter returns a filtered copy of env suitable for sending to the remote.
Rules (applied in order):
- MPROXY_CHANGED_ENVS is always stripped from the output.
- If a var name matches any remove pattern → drop.
- If a var name is in the changed set (from MPROXY_CHANGED_ENVS) → keep.
- If a var name matches any keep pattern → keep.
- Otherwise → drop.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.