Skip to content

Workflow trigger form dispatches invalid schema input in run, schedule and cron modes #5589

Open

Description

@fernandezbaptiste

Hullo folks,

I’m doing some research for Tessl Code Review and ran it against your repo. It flagged a potential issue, and I figured it made sense to share it with you:

The workflow trigger dialog can dispatch input that fails its displayed JSON Schema. This came from a retrospective review of #5183, followed by a check at 26386fbc.

Steps to reproduce

  1. Give a workflow this input schema:
    {"type":"object","required":["name"],"properties":{"name":{"type":"string","minLength":1}}}
  2. Open the trigger dialog, select Form, and leave the required name empty so the value is {}.
  3. Click Submit. Repeat with the run, schedule and cron timing options.

Expected behavior

While Form is selected, a value that fails the displayed schema should block submission and preserve the field errors.

Actual behavior and validation

Codex exercised the unchanged trigger component with React 18.3.1 and test-renderer, injecting the query, mutation and UI boundaries. For {}, the actual @rjsf/validator-ajv8 6.11.0 validator returned a required-field error, but Submit remained enabled and dispatched the corresponding mutation in all three timing modes. The {"name":"valid"} control had no schema errors.

This is a component-level reproduction. It does not establish that the backend accepts or persists the invalid input, and it did not render the full RJSF form in a browser.

Relevant code

The child form forwards changed form data. The parent dialog serializes that data and dispatches from its own Submit handler without checking the schema validation result.

Would it make sense to gate that handler on the current Form value's validation result?

Full transparency: I work at Tessl, and we've spotted that using Tessl Code Review - using repository-level context and specific review lenses that improve over time through feedback. That’s how this finding surfaced.

We’re just getting started and want to offer the tool free to open-source projects. If this is useful, happy to give you access.

Bap

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions