jenkinsci / jenkinsci/workflow-basic-steps-plugin

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

Aperta
#394 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
component:workflow-basic-steps-plugin imported-jira-issue priority:major resolution:unresolved security
Lingua principale
Java
Stelle
73
Fork
129
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

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.

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Inizia da CoreWrapperStep.java, confrontando la memorizzazione dei valori dell’ambiente con BindingStep.java e verificando il requisito di compatibilità di leggere la vecchia map tramite readResolve. Esamina quindi SimpleBuildWrapper.makeSensitiveBuildVariables e Context.env per determinare le implicazioni per l’API; il lavoro è completato quando i valori sono memorizzati come Secret senza compromettere i dati esistenti e il comportamento di mascheramento dei secret è stato gestito.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
java
Ambito
backend, security
Tipo di issue
Funzionalità
Difficoltà
5/5
Tempo stimato
Più di una settimana
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
25/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.