How can I obfuscate specific strings in output to hide secrets?

Open
#873 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
python
Domain
cli

Research direction

Start by tracing Invoke's live command-output handling and the behavior behind hide=False. Determine where configurable string masking could occur without buffering the full command output. Done means matching secrets are replaced in real time while unrelated output continues normally; no files or tests are named in the issue.

Written by the indexing model from the issue text.

Description

There are some commands I run with invoke that offer no built in secrets obfuscation features.

Is there a way to have invoke replace specific strings when it outputs to console with "******"?

I'd like to not have to set hide=False, capture the entire output, do a replace on the entire text and then output it all at once.

It would be better if invoke could do that in real time when its returning the output of a running command.

Is this possible?

Thanks!

Dominant language
Python
Stars
4.8k
Forks
412
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from pyinvoke/invoke

All issues in pyinvoke/invoke

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.