Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mask the home directory path in log #459

Open
suzuki-shunsuke opened this issue Dec 12, 2021 · 2 comments
Open

Mask the home directory path in log #459

suzuki-shunsuke opened this issue Dec 12, 2021 · 2 comments
Labels
enhancement New feature or request

Comments

@suzuki-shunsuke
Copy link
Member

Feature Overview

Replace the home directory path in the log of aqua's command.

Why is the feature needed?

Please explain the problem you want to solve.

The log of aqua includes the home directory path.

e.g.

$ aqua i 
INFO[0000] download and unarchive the package            aqua_version=0.8.3 package_name=aqua-proxy package_version=v0.2.0 program=aqua registry=inline
INFO[0002] create a symbolic link                        aqua_version=0.8.3 link_file=/home/foo/.aqua/bin/aqua-proxy new=../pkgs/github_release/github.com/aquaproj/aqua-proxy/v0.2.0/aqua-proxy_linux_amd64.tar.gz/aqua-proxy program=aqua
INFO[0003] create a symbolic link                        aqua_version=0.8.3 link_file=/home/foo/.aqua/bin/gh new=aqua-proxy program=aqua
INFO[0003] create a symbolic link                        aqua_version=0.8.3 link_file=/home/foo/.aqua/bin/fzf new=aqua-proxy program=aqua
INFO[0003] download and unarchive the package            aqua_version=0.8.3 package_name=junegunn/fzf package_version=0.28.0 program=aqua registry=standard
INFO[0003] download and unarchive the package            aqua_version=0.8.3 package_name=cli/cli package_version=v2.2.0 program=aqua registry=standard

But the home directory path includes the user name.
The user name may be a sensitive information.

When you report a bug, the log is required but the sensitive information should not be included.

Does the feature include Breaking Changes?

No.

Example Code

command and configuration

# Replace the home directory path to `~`
$ aqua i 
INFO[0000] download and unarchive the package            aqua_version=0.8.3 package_name=aqua-proxy package_version=v0.2.0 program=aqua registry=inline
INFO[0002] create a symbolic link                        aqua_version=0.8.3 link_file=~/.aqua/bin/aqua-proxy new=../pkgs/github_release/github.com/aquaproj/aqua-proxy/v0.2.0/aqua-proxy_linux_amd64.tar.gz/aqua-proxy program=aqua
INFO[0003] create a symbolic link                        aqua_version=0.8.3 link_file=~/.aqua/bin/gh new=aqua-proxy program=aqua
INFO[0003] create a symbolic link                        aqua_version=0.8.3 link_file=~/.aqua/bin/fzf new=aqua-proxy program=aqua
INFO[0003] download and unarchive the package            aqua_version=0.8.3 package_name=junegunn/fzf package_version=0.28.0 program=aqua registry=standard
INFO[0003] download and unarchive the package            aqua_version=0.8.3 package_name=cli/cli package_version=v2.2.0 program=aqua registry=standard
@suzuki-shunsuke suzuki-shunsuke added the enhancement New feature or request label Dec 12, 2021
@suzuki-shunsuke
Copy link
Member Author

Is there any feature of logrus to implement this?
https://github.com/sirupsen/logrus

@suzuki-shunsuke
Copy link
Member Author

suzuki-shunsuke commented Dec 12, 2021

I have implemented this halfway, but I doubt this feature is really needed.
Do other tools make the home directory?

#460

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
No open projects
Status: No status
Development

No branches or pull requests

1 participant