Skip to content

Failing git commands leak env to stderr #1117

@leafty

Description

@leafty

If a git command fails, the full contents of env vars may be printed to git-clone logs, including secrets (access tokens, etc.). This is not desirable.

This seems to be a direct effect of these lines in env-pass.sh.

amalthea/env-pass.sh

Lines 6 to 7 in aa94b0b

# Redirect to stderr so as to not interfere with the stdout needed for username/password prompts
printenv >&2 # Do not try echo "$GIT_PREFIX", it doesn't seem to be inherited by this process

@sgaist Do we print the environment just for debugging?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions