fix(execution): exclude parameterValues from Execution JSON serialization - #8027
Merged
hansva merged 1 commit intoAug 21, 2026
Merged
Conversation
…tion Execution.parameterValues carried no @JsonIgnore while the sibling variableValues field was already deprecated and JsonIgnore'd for the same reason: this class is serialized wholesale to JSON by GetExecutionInfoServlet and the REST LocationResource, and pipeline/workflow parameters routinely carry secrets (DB passwords, API tokens). Add @JsonIgnore to parameterValues, matching the existing variableValues protection. This only affects JSON (de)serialization; in-process consumers (BaseExecutionViewer, WorkflowExecutionViewer, PipelineExecutionViewer) read the values directly via the Java getter and are unaffected. Signed-off-by: zanarelli <zanarelli.dev@gmail.com>
Contributor
|
Thanks for the contribution @zanarellidev ! |
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.
Follow-up from a private report I sent to security@apache.org (forwarded to the Hop PMC). ASF Security's read was that this isn't a vulnerability under Hop's threat model (SECURITY.md §7/§13 — the caller already needs Hop Server credentials, which is out of scope), but they agreed the asymmetry is worth fixing on its own merits and suggested I open it as a normal contribution instead. That's this PR.
What
Execution.parameterValueshad no@JsonIgnore, while the siblingvariableValuesfield is already@Deprecated @JsonIgnore'd for the same reason:Executionis serialized wholesale to JSON byGetExecutionInfoServlet(GET /hop/getExecInfo) and the RESTLocationResource, and pipeline/workflow parameters routinely carry secrets (DB passwords, API tokens).Fix
Add
@JsonIgnoretoparameterValues, matching the existingvariableValuesprotection.This only affects JSON (de)serialization — in-process consumers (
BaseExecutionViewer,WorkflowExecutionViewer,PipelineExecutionViewer) read the values directly via the Java getter and are unaffected.Test plan
Added
ExecutionTest.testParameterValuesNotSerialized: asserts neitherparameterValuesnorvariableValues(nor their values) appear in the JSON produced byHopJson, while other fields still serialize normally.Confirmed fail-before/pass-after locally: reverting the
@JsonIgnorereproduces the leak (test fails with the plaintext value present in the JSON), reapplying it passes.mvn -pl engine -am test -Dtest=org.apache.hop.execution.*andmvn -pl rest -am testboth green.spotless:applyrun.I hereby declare this contribution to be licensed under the Apache License Version 2.0, January 2004
This report was prepared with AI coding-agent assistance, independently verified against current source and tests before opening.