Skip to content

Some sub-commands (config for example) can output secrets (passwords) #4222

@Klaim

Description

@Klaim

We have a test that expects the output of mamba config ... to show a password:

def test_envsubst_windows_problem(self, monkeypatch, rc_file):

This test fails in my PR because in it --json leads to usage of the hide_secrets function on the output.

I first attempted to disable hiding secrets in config output, but having a doubt I checked with @JohanMabille and we agree that the test is wrong and the password should never be visible with or without --json (normal output is in the YAML format).

I'm creating this issue so that we can discuss the most correct and expected output.
What do you think? @AntoinePrv @jjerphan @Hind-M

Note: I intend to make a pr for this if we agree. It's easier to fix in my pr but it's kind of unrelated to --json.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions