jenkinsci / jenkinsci/credentials-binding-plugin
[JENKINS-67074] Secrets are not masked when URL-encoded
- Dominant language
- Java
- Stars
- 57
- Forks
- 108
- PR merge metrics
- No merged PRs in 30d
Description
The credentials-binding-plugin tries to hide its secrets from the jenkins log. I presume the algoritm is to do a simple replace on the known passwords with ****
The trouble is, if you want to use that password to pass to git... as in...
git clone https://${MYUSER}:${MYPASS}/bitbucket.org/myproject/myrepository
that doesn't work because MYPASS has to be url encoded... so what one does is something like:
git clone https://${MYUSER}:`echo -n "$MYPASS" | jq -sRr @uri`/bitbucket.org/myproject/myrepository
This now works BUT since your password is now URL encoded, the secret hiding algorithm will now reveal it in the log.
I suppose the simplest solution to this is to mask not only the password, but the url encoded password too.
---
Originally reported by xpusostomos, imported from: Secrets are not masked when URL-encoded
Raw content of original issue
The credentials-binding-plugin tries to hide its secrets from the jenkins log. I presume the algoritm is to do a simple replace on the known passwords with ****
The trouble is, if you want to use that password to pass to git... as in...
git clone https://${MYUSER}:${MYPASS}/bitbucket.org/myproject/myrepository
that doesn't work because MYPASS has to be url encoded... so what one does is something like:
git clone https://${MYUSER}:`echo -n "$MYPASS" | jq -sRr @uri`/bitbucket.org/myproject/myrepositoryThis now works BUT since your password is now URL encoded, the secret hiding algorithm will now reveal it in the log.
I suppose the simplest solution to this is to mask not only the password, but the url encoded password too.
Contributor guide
Assessment
This issue has not been assessed yet.