Start enforcing the $PATH restrictions

Anything that isn't explicitly marked as Allowed in this list will now
return an error (and log a message) when it is executed.

Test: search all logs from the build server over the last day
Change-Id: I3ceacd9a140097809dde81a8d8979dd2c45f234c
This commit is contained in:
Dan Willemsen
2018-08-15 15:26:39 -07:00
parent 8a9900a75f
commit 8125d2a2a2

View File

@@ -40,12 +40,13 @@ var Forbidden = PathConfig{
}
// The configuration used if the tool is not listed in the config below.
// Currently this will create the symlink, but log a warning. In the future,
// I expect this to move closer to Forbidden.
// Currently this will create the symlink, but log and error when it's used. In
// the future, I expect the symlink to be removed, and this will be equivalent
// to Forbidden.
var Missing = PathConfig{
Symlink: true,
Log: true,
Error: false,
Error: true,
}
func GetConfig(name string) PathConfig {