jenkinsci / jenkinsci/workflow-basic-steps-plugin

[JENKINS-28719] Store environment variable values for CoreWrapperStep as Secret

Open
#394 0 comments 0 reactions 0 assignees View on GitHub
component:workflow-basic-steps-plugin imported-jira-issue priority:major resolution:unresolved security
Dominant language
Java
Stars
73
Forks
129
PR merge metrics
No merged PRs in 30d

Description

withCredentials stores values encrypted. wrap currrently does not, but it should. (For compatibility, need to readResolve the old map.)

withCredentials also masks secrets accidentally printed to the log. It would perhaps be undesirable for wrap to do so unconditionally, since there may be legitimate reasons to see non-secret variables in build output. Discriminating between the two cases mechanically is unfortunately not possible without an API change to SimpleBuildWrapper, such as making makeSensitiveBuildVariables take Run rather than AbstractBuild, or adding a variant to Context.env.

If both issues are addressed, withCredentials could probably be deprecated (marked isAdvanced), with SecretBuildWrapper made a SimpleBuildWrapper.

---
Originally reported by jglick, imported from: Store environment variable values for CoreWrapperStep as Secret


  • assignee: jglick
  • status: Open
  • priority: Major
  • component(s): workflow-basic-steps-plugin
  • label(s): api, security
  • resolution: Unresolved
  • votes: 0
  • watchers: 2
  • imported: 20251215-220547

Raw content of original issue

withCredentials stores values encrypted. wrap currrently does not, but it should. (For compatibility, need to readResolve the old map.)

withCredentials also masks secrets accidentally printed to the log. It would perhaps be undesirable for wrap to do so unconditionally, since there may be legitimate reasons to see non-secret variables in build output. Discriminating between the two cases mechanically is unfortunately not possible without an API change to SimpleBuildWrapper, such as making makeSensitiveBuildVariables take Run rather than AbstractBuild, or adding a variant to Context.env.

If both issues are addressed, withCredentials could probably be deprecated (marked isAdvanced), with SecretBuildWrapper made a SimpleBuildWrapper.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.