KocproZ / jenkins-discord

A post-build plugin that sends the build status to a Discord channel.
MIT License
39 stars 36 forks source link

Securing webhook URL in the Jenkinsfile #24

Closed PT400C closed 6 years ago

PT400C commented 6 years ago

Does anyone have an idea, how one should protect the webhooks url when using pipelines?

As it is now, anyone could "steal" the URL and abuse that.

KocproZ commented 6 years ago

You can add webhook URL as a Secret Text credential in jenkins and get it in Jenkinsfile using withCredentials block.

I tested that and can confirm it works.