Skip to content

Revert "Add protections for loop-bound injections"#5847

Merged
christopherholland-workday merged 1 commit intomainfrom
revert-5773-loop-bound-injection
Feb 25, 2026
Merged

Revert "Add protections for loop-bound injections"#5847
christopherholland-workday merged 1 commit intomainfrom
revert-5773-loop-bound-injection

Conversation

@christopherholland-workday
Copy link
Contributor

@christopherholland-workday christopherholland-workday commented Feb 25, 2026

Reverts #5773

I do not know how this got merged in accidentally

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @christopherholland-workday, 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 undoes a previous change that introduced specific constants intended to protect against loop-bound injection attacks. The reversal removes these limits, effectively restoring the code to its state before the protections were implemented. The primary impact is the removal of array size constraints within the evaluation runner service.

Highlights

  • Revert of Loop-Bound Injection Protections: This pull request fully reverts the changes introduced in Add protections for loop-bound injections #5773, which aimed to add protections against loop-bound injections. Specifically, it removes the MAX_OUTPUTS, MAX_EVALUATORS, and MAX_SPLIT_VALUES constants that were previously added to limit array sizes.
Changelog
  • packages/server/src/services/evaluations/EvaluatorRunner.ts
    • Removed MAX_OUTPUTS, MAX_EVALUATORS, and MAX_SPLIT_VALUES constants.
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.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

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.

Copy link
Contributor

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

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 reverts changes that were intended to add protection against Denial of Service (DoS) attacks. By removing the constants that limit array sizes in loops, the application may become vulnerable to resource exhaustion if malicious, large inputs are provided. This re-introduces a critical security vulnerability.

I am having trouble creating individual review comments. Click here to see my feedback.

packages/server/src/services/evaluations/EvaluatorRunner.ts (13-16)

security-critical critical

Removing these constants eliminates protections against potential Denial of Service (DoS) attacks. These constants were intended to limit array sizes to prevent resource exhaustion from long-running loops over inputs like actualOutputArray, selectedEvaluators, and splitValues. Reverting this change re-introduces a security vulnerability where a malicious user could provide very large inputs, leading to excessive CPU usage and service unavailability. If the original protections caused problems, an alternative mitigation should be implemented rather than removing them entirely.

@christopherholland-workday christopherholland-workday marked this pull request as ready for review February 25, 2026 21:53
@christopherholland-workday christopherholland-workday merged commit 4b7e6d6 into main Feb 25, 2026
7 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