Skip to content

MLE-3247: Load pipeline notification emails from Jenkins secret file#441

Merged
vitalykorolev merged 1 commit intodevelopfrom
MLE-3247_hide-pipeline-emails-in-secret
Apr 14, 2026
Merged

MLE-3247: Load pipeline notification emails from Jenkins secret file#441
vitalykorolev merged 1 commit intodevelopfrom
MLE-3247_hide-pipeline-emails-in-secret

Conversation

@vitalykorolev
Copy link
Copy Markdown
Collaborator

Summary

Hardcoded team email addresses in Jenkinsfile were publicly visible in the repository, exposing sensitive information.

Root cause

emailList and emailSecList were declared as global variables at the top of the Jenkinsfile with literal email addresses.

Fix

Removed both hardcoded globals. Added a loadEmailConfig() helper that reads emailList and emailSecList at runtime from the KUBE_NINJAS_PIPELINE_EMAILS Jenkins secret file credential (properties format). Both resultNotification() and vulnerabilityScan() now call this helper. The emailList pipeline 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_EMAILS has been created with the following format:

emailList=<comma-separated team emails>
emailSecList=<security team email>

Validation

Pipeline build to be triggered on this PR to confirm loadEmailConfig() resolves correctly at runtime.

Jira: https://progresssoftware.atlassian.net/browse/MLE-3247

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 / emailSecList values.
  • Added loadEmailConfig() to read notification recipients from a Jenkins secret file credential at runtime.
  • Updated resultNotification() and vulnerabilityScan() to use the loaded configuration and adjusted the emailList parameter to be an optional override.

Comment thread Jenkinsfile Outdated
Comment thread Jenkinsfile Outdated
Comment thread Jenkinsfile
Comment thread Jenkinsfile Outdated
@vitalykorolev vitalykorolev force-pushed the MLE-3247_hide-pipeline-emails-in-secret branch from 74fffd4 to 3da1e27 Compare April 12, 2026 20:38
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.
@vitalykorolev vitalykorolev force-pushed the MLE-3247_hide-pipeline-emails-in-secret branch from 3da1e27 to 8d4fa7c Compare April 12, 2026 20:43
@vitalykorolev vitalykorolev removed the request for review from barkhachoithani April 12, 2026 21:12
@vitalykorolev vitalykorolev merged commit 11b455a into develop Apr 14, 2026
4 of 5 checks passed
@vitalykorolev vitalykorolev deleted the MLE-3247_hide-pipeline-emails-in-secret branch April 14, 2026 18:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants