Skip to content

shellEnvBlock should block *PASSWORD*, *TOKEN*, *SECRET*, etc. by default? #4058

@AkihiroSuda

Description

@AkihiroSuda

// defaultBlockList contains environment variables that should not be propagated by default.
var defaultBlockList = []string{
"BASH*",
"DISPLAY",
"DYLD_*",
"EUID",
"FPATH",
"GID",
"GROUP",
"HOME",
"HOSTNAME",
"LD_*",
"LOGNAME",
"OLDPWD",
"PATH",
"PWD",
"SHELL",
"SHLVL",
"SSH_*",
"TERM",
"TERMINFO",
"TMPDIR",
"UID",
"USER",
"XAUTHORITY",
"XDG_*",
"ZDOTDIR",
"ZSH*",
"_*", // Variables starting with underscore are typically internal
}

I thought the list was initially designed to block *PASSWORD*, *TOKEN*, *SECRET*, etc. by default, but did we change the design on purpose? (because the list cannot be robust?)

Can't find the relevant conversation in:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions