- Notifications
You must be signed in to change notification settings - Fork920
fix(agent): filter outGOTRACEBACK=none
#16924
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Changes fromall commits
File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -50,7 +50,17 @@ func (SystemEnvInfo) User() (*user.User, error) { | ||
} | ||
func (SystemEnvInfo)Environ() []string { | ||
varenv []string | ||
for_,e:=rangeos.Environ() { | ||
// Ignore GOTRACEBACK=none, as it disables stack traces, it can | ||
// be set on the agent due to changes in capabilities. | ||
// https://pkg.go.dev/runtime#hdr-Security. | ||
ife=="GOTRACEBACK=none" { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. Is there any way for us to override this for ourselves that doesn't also override it for any user of coder? Seems like we're choosing for any user of coder that GOTRACEBACK shouldn't be set. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. On Linux, we could theoretically read If someone sets this env in, say, a docker container resource. Yes, it will be filtered out for child-processes (which arguably may be the right thing to do anyway). But if someone sets it on the agent resource (which is the recommended way anyway), they absolutely still can. | ||
continue | ||
} | ||
env=append(env,e) | ||
} | ||
returnenv | ||
} | ||
func (SystemEnvInfo)HomeDir() (string,error) { | ||
Uh oh!
There was an error while loading.Please reload this page.