Skip to content

Validate types when deserializing pipeline jobs and status - #7858

Merged
labkey-jeckels merged 6 commits into
developfrom
fb_pipelineJobDeserialization
Jul 22, 2026
Merged

Validate types when deserializing pipeline jobs and status#7858
labkey-jeckels merged 6 commits into
developfrom
fb_pipelineJobDeserialization

Conversation

@labkey-jeckels

@labkey-jeckels labkey-jeckels commented Jul 18, 2026

Copy link
Copy Markdown
Contributor

Rationale

We can improve security by restricting the types that are allowed when deserializing pipeline jobs and status messages using Jackson and XStream.

Changes

  • Deprecated feature flag to temporarily disable the validation if needed
  • Allow all LabKey classes and select JDK classes, plus a few third-party libraries
  • Logging to help troubleshoot intermittent PipelineCancelTest failure

Tasks 📍

  • Claude Code Review
  • Test Automation
    • All pipeline jobs always go through serialization/deserialization as part of their submission process, intended to help validate round-tripping like this
  • User Education Handoff @labkey-jeckels
    • Worth a developer-oriented release note for 26.8+. All pipeline jobs are now strict on which Java classes are allowed during deserialization. If a legitimate type is blocked, submit a support request to LabKey or update based on the allowed list in PipelineJacksonTyping.
    • If there is a problem, the deprecated feature flag "Disable pipeline deserialization type allowlists" can be used as a temporary workaround.

@labkey-jeckels labkey-jeckels self-assigned this Jul 18, 2026
@labkey-jeckels
labkey-jeckels marked this pull request as ready for review July 20, 2026 16:59
Use deprecated flag for status too
@labkey-jeckels
labkey-jeckels requested a review from a team July 20, 2026 19:09
// An Object[] carries a [Ljava.lang.X; type id even for scalars that travel untyped as bare values, so
// String[]/Integer[] exercise the component-type allow that a direct String/Integer value does not.
map.put("stringArray", new String[]{"a", "b"});
map.put("intArray", new Integer[]{1, 2});

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Test a multi-dimensional array?

@labkey-jeckels labkey-jeckels Jul 21, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Added Object[][] to the test scenario, which made me add Object[] as a supported type.

We'd still block things like Number[] or Number[][] that could be safely supported. I'll leave it here, and we can add more types as they come up in real usage.

@labkey-jeckels labkey-jeckels added this to the 26.08 milestone Jul 22, 2026
@labkey-jeckels
labkey-jeckels merged commit fa334c3 into develop Jul 22, 2026
7 checks passed
@labkey-jeckels
labkey-jeckels deleted the fb_pipelineJobDeserialization branch July 22, 2026 00:23
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