jenkinsci / jenkinsci/credentials-binding-plugin
[JENKINS-60700] Credentials Binding Plugin binds to partial string matches
- Dominant language
- Java
- Stars
- 57
- Forks
- 108
- PR merge metrics
- No merged PRs in 30d
Description
Same as JENKINS-43032">JENKINS-43032, except the value I bound to a username in withCredentials is being bound to a string not related to the binding.
ex.
CHART_NAME=ingestion-tracking
value of DATASOURCE_USERNAME = ingestion
withCredentials([usernamePassword(credentialsId: "${DATASOURCE_CREDS}", passwordVariable: 'DATASOURCE_PASSWORD', usernameVariable: 'DATASOURCE_USERNAME')
]) {
sh "echo ${DATASOURCE_USERNAME}"
sh "echo ${CHART_NAME}"
}
will yield:
****
****-tracking
I expect:
****
ingestion-tracking
---
Originally reported by timmerkt_perspecta, imported from: Credentials Binding Plugin binds to partial string matches
Raw content of original issue
Same as
JENKINS-43032, except the value I bound to a username in withCredentials is being bound to a string not related to the binding.ex.
CHART_NAME=ingestion-tracking
value of DATASOURCE_USERNAME = ingestion
withCredentials([usernamePassword(credentialsId: "${DATASOURCE_CREDS}", passwordVariable: 'DATASOURCE_PASSWORD', usernameVariable: 'DATASOURCE_USERNAME')
]) {
sh "echo ${DATASOURCE_USERNAME}"sh "echo ${CHART_NAME}"
}will yield:
****
****-tracking
I expect:
****ingestion-tracking
environment
```
credentials-binding-plugin 1.20
Jenkins 2.190.1
```
Contributor guide
Assessment
This issue has not been assessed yet.