Skip to content

fix(execution): exclude parameterValues from Execution JSON serialization - #8027

Merged
hansva merged 1 commit into
apache:mainfrom
zanarellidev:fix/redact-execution-parameter-values
Aug 21, 2026
Merged

fix(execution): exclude parameterValues from Execution JSON serialization#8027
hansva merged 1 commit into
apache:mainfrom
zanarellidev:fix/redact-execution-parameter-values

Conversation

@zanarellidev

Copy link
Copy Markdown
Contributor

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.parameterValues had no @JsonIgnore, while the sibling variableValues field is already @Deprecated @JsonIgnore'd for the same reason: Execution is serialized wholesale to JSON by GetExecutionInfoServlet (GET /hop/getExecInfo) and the REST LocationResource, and pipeline/workflow parameters routinely carry secrets (DB passwords, API tokens).

Fix

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.

Test plan

  • Added ExecutionTest.testParameterValuesNotSerialized: asserts neither parameterValues nor variableValues (nor their values) appear in the JSON produced by HopJson, while other fields still serialize normally.

  • Confirmed fail-before/pass-after locally: reverting the @JsonIgnore reproduces 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.* and mvn -pl rest -am test both green.

  • spotless:apply run.

  • 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.

…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>
@hansva

hansva commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

Thanks for the contribution @zanarellidev !
Much appreciated for helping improve and harden the codebase

@hansva
hansva merged commit 46be47b into apache:main Aug 21, 2026
3 checks passed
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.

2 participants