mirror of
https://github.com/Twigpine/zero.git
synced 2026-11-08 09:49:34 -10:00
Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
49b5a19551 |
No files matched your search
@@ -1027,6 +1027,13 @@ func scrubSensitiveEnv(env []string, additionalKeys ...string) []string {
|
||||
"GH_TOKEN",
|
||||
"ZERO_WEBSEARCH_API_KEY",
|
||||
"ZERO_DAEMON_REMOTE_TOKEN",
|
||||
// The file form of the same bridge token. TokenFromEnv accepts either,
|
||||
// so scrubbing only the inline variable left the pointer readable, and
|
||||
// the default sandbox posture is read-all. There is no fallback
|
||||
// location to guess at, the path comes from this variable alone, so
|
||||
// removing it closes the leak rather than half of it. Same reasoning as
|
||||
// GOOGLE_APPLICATION_CREDENTIALS below.
|
||||
"ZERO_DAEMON_REMOTE_TOKEN_FILE",
|
||||
}
|
||||
for _, descriptor := range providercatalog.All() {
|
||||
for _, key := range descriptor.AuthEnvVars {
|
||||
|
||||
@@ -699,6 +699,11 @@ func TestScrubSensitiveEnv(t *testing.T) {
|
||||
"XAI_API_KEY=xai-12345",
|
||||
"HUGGINGFACE_API_KEY=hf_12345",
|
||||
"GOOGLE_APPLICATION_CREDENTIALS=/home/user/sa-key.json",
|
||||
// Both forms of the daemon bridge token. The inline one was already
|
||||
// scrubbed; the file form was not, which left a sandboxed command the
|
||||
// path to read it from (#677).
|
||||
"ZERO_DAEMON_REMOTE_TOKEN=bridge-token-inline",
|
||||
"ZERO_DAEMON_REMOTE_TOKEN_FILE=/home/user/.zero/remote-token",
|
||||
"COMPANY_LLM_SECRET=custom-secret",
|
||||
"ZERO_OAUTH_MY_SVC_CLIENT_SECRET=oauth-secret",
|
||||
"zero_oauth_second_client_secret=case-insensitive-secret",
|
||||
|
||||
Reference in new issue
Block a user