mirror of
https://github.com/gravitational/teleport.git
synced 2026-11-04 02:21:02 +08:00
* Better control on user injected environment values This commit includes two changes: * In `environment` we expanded the list of MacOS environment values which should be filtered. It was demonstrated that these can be used to get code execution in MacOS. * In `reexec` we no longer provide the cmdmsg.Environment for the `teleport exec`. As part of the development ofa9055bccd9it was attempted to fully clear out the environment, but testing showed that to be potentially problematic. It was believed the safest option was to use the cmd environment, however this introduces a new source of environment variables. Because this exec happens under `root` this is particularly dangerous (even more so when combined with the missed OSX values mentioned above). As such we now are only providing the filtered exec environment, which is a closer (but safer) option to the functionality prior toa9055bccd9. * Update filter to exclude all DYLD_ and LD_ prefixed variables