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

ODS 2.x - Nexus password in plain text at the $JenkinsLog on a quickstarter build #288

Closed
borja44 opened this issue Apr 28, 2020 · 10 comments · Fixed by #329 or #330
Closed

ODS 2.x - Nexus password in plain text at the $JenkinsLog on a quickstarter build #288

borja44 opened this issue Apr 28, 2020 · 10 comments · Fixed by #329 or #330
Assignees
Labels
bug Something isn't working

Comments

@borja44
Copy link

borja44 commented Apr 28, 2020

ODS 2.x - Security bug. A password in plain text during the execution of a Jenkins quickstarter build. (all quickstarters builds the password).

Log output here...


[Pipeline] stage
[Pipeline] { (odsPipeline start)
[Pipeline] sh (getting ODS shared lib version)
[workspace] Running shell script
+ env
+ grep library.ods-jenkins-shared-library.version
+ cut -d= -f2
[Pipeline] sh (getting GIT url)
[workspace] Running shell script
+ git config --get remote.origin.url
[Pipeline] sh (getting GIT branch to build)
[workspace] Running shell script
+ oc get bc/april-spring-master -n whatever-cd -o 'jsonpath={.spec.source.git.ref}'
[Pipeline] sh (getting GIT commit)
[workspace] Running shell script
+ git rev-parse HEAD
[Pipeline] sh (getting GIT commit author)
[workspace] Running shell script
+ git --no-pager show -s '--format=%an (%ae)' HEAD
[Pipeline] sh (getting GIT commit message)
[workspace] Running shell script
+ git log -1 --pretty=%B HEAD
[Pipeline] sh (getting GIT commit date/time)
[workspace] Running shell script
+ git show -s --format=%ci HEAD
[Pipeline] echo
Assembled configuration: [image:docker-registry.cd/jenkins-slave-maven:2.x, 
projectId:whatever, componentId:april-spring, 
branchToEnvironmentMapping:[master:dev], 
localCheckoutEnabled:true, jobName:whatever-cd/whatever-cd-april-spring-master, 
buildNumber:1, buildUrl:https://jenkins-whatever-cd.mydomain.com.randomcompany.com/job/whatever-cd/job/whatever-cd-april-spring-master/1/, 
buildTime:Fri Apr 24 19:41:15 UTC 2020, 
nexusHost:https://nexus-repository-infra.mydomain.com.randomcompany.com, 
**nexusUsername:whoever, **nexusPassword:xxxxxxxxxxxxxxxxxxxxxxx**,** 

openshiftHost:https://openshift.default.svc.cluster.local, bitbucketHost:bitbucket.company.com, odsSharedLibVersion:2.x,


@borja44 borja44 added the bug Something isn't working label Apr 28, 2020
@michaelsauter
Copy link
Member

This is fixed in master via #211. Ok to close? Or should we back port to 2.x?

@clemensutschig
Copy link
Member

this only happens ins debug mode -or?

@clemensutschig clemensutschig added the duplicate This issue or pull request already exists label Apr 28, 2020
@michaelsauter
Copy link
Member

@clemensutschig In master yes, in 2.x also in info mode.

@segator
Copy link
Contributor

segator commented Apr 30, 2020

This need to be ported to 2.x, is a huge security issue

@gerardcl gerardcl removed the duplicate This issue or pull request already exists label May 8, 2020
@gerardcl gerardcl changed the title Nexus password in plain text at the $JenkinsLog on a quickstarter build ODS 2.x - Nexus password in plain text at the $JenkinsLog on a quickstarter build May 8, 2020
@clemensutschig
Copy link
Member

not fixed on master (if in debug mode) - context.toString

@stitakis
Copy link
Member

stitakis commented May 11, 2020

@michaelsauter I assume because the title is ODS 2.x, that yes, it needs to be ported to 2.x.
So, we need to get this fixed asap:

  • what is the status of this?
  • to whom is this assigned?

@michaelsauter
Copy link
Member

OK. Let's backport this for 2.x. @renedupont Can you help there? I guess applying/testing what you did on master back then should work.

I can make sure this is fixed on master as I'm doing testing there anyway.

@stitakis
Copy link
Member

@michaelsauter as @clemensutschig commented this is not fixed if logging level is set to debug. ('logger.debug "Assembled configuration: ${config}") We need a different solution... brainstorming now... maybe a method override of config.toString()that mask sensible variables with*****` could work. Thou maybe there is a more simpler solution for this. btw... who is looking at this? (asking because there is currently no developer assigned to this ticket)

@clemensutschig
Copy link
Member

@stitakis / @borja44 - not sure why we are discussing endlessly about a 2 line fix .. I'll do it now! - grrrrr!

@clemensutschig clemensutschig self-assigned this May 11, 2020
@clemensutschig clemensutschig linked a pull request May 11, 2020 that will close this issue
@stitakis
Copy link
Member

@martsec fyi!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
6 participants