MLE-3247: Load pipeline notification emails from Jenkins secret file#441
Merged
vitalykorolev merged 1 commit intodevelopfrom Apr 14, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR removes hardcoded notification email addresses from the Jenkinsfile and replaces them with runtime-loaded values from a Jenkins secret file credential (KUBE_NINJAS_PIPELINE_EMAILS), reducing exposure of sensitive contact info in the repository.
Changes:
- Removed globally hardcoded
emailList/emailSecListvalues. - Added
loadEmailConfig()to read notification recipients from a Jenkins secret file credential at runtime. - Updated
resultNotification()andvulnerabilityScan()to use the loaded configuration and adjusted theemailListparameter to be an optional override.
74fffd4 to
3da1e27
Compare
Replace hardcoded emailList and emailSecList global variables with a loadEmailConfig() helper that reads both values from the KUBE_NINJAS_PIPELINE_EMAILS Jenkins secret file credential at runtime. The emailList pipeline parameter is kept as an optional override at the bottom of the parameter list; when left blank the credential value is used, preserving the existing override behaviour for ad-hoc build runs.
3da1e27 to
8d4fa7c
Compare
rwinieski
approved these changes
Apr 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Hardcoded team email addresses in Jenkinsfile were publicly visible in the repository, exposing sensitive information.
Root cause
emailListandemailSecListwere declared as global variables at the top of the Jenkinsfile with literal email addresses.Fix
Removed both hardcoded globals. Added a
loadEmailConfig()helper that readsemailListandemailSecListat runtime from theKUBE_NINJAS_PIPELINE_EMAILSJenkins secret file credential (properties format). BothresultNotification()andvulnerabilityScan()now call this helper. TheemailListpipeline parameter is retained as an optional per-run override; when left blank the credential value is used.Credential setup (one-time, already done)
A Jenkins secret file credential with ID
KUBE_NINJAS_PIPELINE_EMAILShas been created with the following format:Validation
Pipeline build to be triggered on this PR to confirm
loadEmailConfig()resolves correctly at runtime.Jira: https://progresssoftware.atlassian.net/browse/MLE-3247