Skip to content

Fix IDOR in Evaluators and Evaluations Endpoints#6050

Merged
yau-wd merged 3 commits into
mainfrom
flowise-323-evaluations
Apr 1, 2026
Merged

Fix IDOR in Evaluators and Evaluations Endpoints#6050
yau-wd merged 3 commits into
mainfrom
flowise-323-evaluations

Conversation

@christopherholland-workday

Copy link
Copy Markdown
Contributor

Flowise-323 (See comments on Evaluation and Evaluators)

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request addresses a potential Insecure Direct Object Reference (IDOR) vulnerability within the Evaluators and Evaluations endpoints. By transitioning from generic Object.assign operations to explicit property assignments, the changes ensure that only authorized and intended data fields are processed during entity creation and updates. This significantly improves the security posture by preventing mass assignment issues and correctly associating entities with their respective workspaces.

Highlights

  • Security Enhancement: Replaced generic Object.assign operations with explicit property assignments in EvaluatorDTO.toEntity to prevent potential mass assignment vulnerabilities and unintended data exposure or modification.
  • Data Integrity for Evaluations: Updated the createEvaluation function to explicitly assign all necessary properties, including workspaceId, ensuring data integrity and proper association of evaluation entities.
  • Workspace ID Enforcement: Ensured that workspaceId is explicitly set during both the creation and update processes for Evaluator entities, reinforcing access control and preventing IDOR.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@gemini-code-assist gemini-code-assist Bot left a comment

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.

Code Review

This pull request refactors the creation and update logic for Evaluator and Evaluation entities. It replaces generic Object.assign calls with explicit property assignments for name, type, evaluationType, chatflowId, chatflowName, datasetId, datasetName, and workspaceId. This change enhances security by preventing mass assignment vulnerabilities and ensuring sensitive fields like workspaceId are explicitly set from trusted sources. I have no feedback to provide.

Comment thread packages/server/src/Interface.Evaluation.ts Outdated
Comment thread packages/server/src/services/evaluations/index.ts Outdated
Comment thread packages/server/src/services/evaluator/index.ts
Comment thread packages/server/src/services/evaluator/index.ts
@christopherholland-workday christopherholland-workday marked this pull request as ready for review March 24, 2026 20:28

@0xi4o 0xi4o left a comment

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.

Just one nitpick but good to go.

Comment thread packages/server/src/services/evaluations/index.ts
@yau-wd yau-wd merged commit dc07f40 into main Apr 1, 2026
7 checks passed
@yau-wd yau-wd deleted the flowise-323-evaluations branch April 1, 2026 14:32
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.

5 participants