如何在 Jenkins 构建历史中屏蔽参数和密码?
How to mask parameters and password in Jenkins build history?
使用密码参数接受用户凭据时,
Jenkins 构建历史 -> 参数以纯文本形式显示密码。
如何屏蔽它?
您可以使用 Mask Passwords Plugin。
使用此插件,密码不会在作业配置或控制台中显示为纯文本。
您可以使用常规的 password
参数类型,例如使用在 jenkins 文件中定义的参数:https://jenkins.io/doc/book/pipeline/syntax/#parameters
问题在于,即使它在您访问构建的 "Parameters" 部分以及在 "Build with parameters" 上写入时屏蔽密码,如果在任何时候该值打印在日志中,显示。
为了避免出现 Mask Passwords Plugin,如前所述
Javier C.. The problem with that one is that the plugin at the moment of writing this answer is up for adoption and has security vulnerabilities.
使用密码参数接受用户凭据时, Jenkins 构建历史 -> 参数以纯文本形式显示密码。
如何屏蔽它?
您可以使用 Mask Passwords Plugin。
使用此插件,密码不会在作业配置或控制台中显示为纯文本。
您可以使用常规的 password
参数类型,例如使用在 jenkins 文件中定义的参数:https://jenkins.io/doc/book/pipeline/syntax/#parameters
问题在于,即使它在您访问构建的 "Parameters" 部分以及在 "Build with parameters" 上写入时屏蔽密码,如果在任何时候该值打印在日志中,显示。
为了避免出现 Mask Passwords Plugin,如前所述 Javier C.. The problem with that one is that the plugin at the moment of writing this answer is up for adoption and has security vulnerabilities.