corral
corral copied to clipboard
Remove promisicious Env usage?
Currently all the VCSes get passed Env which allows them to print to stdout, stderr etc.
Unfortunately this also gives me ambient auth which we probably do not want. Given that Env gives access to root it would allow for anything to be done, open files, open sockets, etc.
I think we should narrow down to passing only the minimally needed env usage and work from there and add additional access as needed.
Should we separate out the auth that is needed by VCSs to get their programs, and the vars that are needed for PATH and sub-processes, and err and out for writing output?
Yes, and whatever auth we supply to VCSs should be the minimal required.
The VCSs use an env for these things:
- Find their binary on
env.vars["PATH"]or useAmbientAuthif binary is an absolute path. - Pass
env.varsto VCS command processes - Get auth for
ProcessMonitor, which needsStartProcessAuthandApplyReleaseBackpressureAuth - Print to
env.errwhich can be easily replaced or migrated to useLog
Other than the last item, I am not clear on how to supply all these disparate values to the VCSs so that they can find and run their binaries.