-
-
Notifications
You must be signed in to change notification settings - Fork 938
Command's DEBUG reveals username/password from URL #1927
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
Comments
Thanks for reporting. Could you also show the python code that triggers these? I have a suspicion. In any case, there already is functionality to hide seemingly sensitive data, but it's based on knowing where the data is. If in doubt, that debug message can probably just be removed or downgraded to trace. |
Our core code:
Mentioned
|
Thanks a lot! It looks like the Further, one should probably review the public API and find all URL parameters, and assure that these are obfuscated in the log. |
DEBUG output from cmd.py module displays all parameters, including URL with username/password passed as part of URL.
Pay attention: some commands (like:
clone
) hide sensitive data:DEBUG [cmd.py 1057] Popen(['git', 'clone', '-v', '--branch=repo_template', '--', 'https://*****:*****@bitbucket.company.com/scm/abc/deployment-repository.git', '/tmp/aca_clone_gj18o2n9'], cwd=/home/jenkins/workspace/abc/abc_wizard, stdin=None, shell=False, universal_newlines=True)
While Exception and other commands (like:
remote add
) do not hide:DEBUG [cmd.py 1057] Popen(['git', 'remote', 'add', '--', 'origin','https://username:[email protected]/scm/kafka/qaz-repository.git'], cwd=/tmp/aca_clone_gj18o2n9,stdin=None, shell=False, universal_newlines=False)
ERROR [git_wrapper.py 511] Exception from git: stderr: 'fatal: unable to access 'https://username:[email protected]/scm/kafka/qaz-repository.git/': URL using bad/illegal format or missing URL'
The text was updated successfully, but these errors were encountered: