Fix Paramater Override Bypass#5667
Conversation
Summary of ChangesHello @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 improves the robustness of the system by addressing a potential security bypass in parameter override configurations and strengthening environment variable handling. It ensures that all parameters undergo consistent validation and explicitly marks Highlights
Using Gemini Code AssistThe 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
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 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
|
There was a problem hiding this comment.
Code Review
This pull request introduces two important security fixes. First, it adds NODE_OPTIONS to the list of dangerous environment variables in the MCP tool, preventing potential arbitrary code execution vulnerabilities. Second, it removes a bypass in the parameter override logic that allowed FILE-STORAGE:: values to skip validation, ensuring all overrides are now correctly checked against the isParameterEnabled setting. Both changes are well-implemented and significantly improve the security and consistency of the codebase. The changes look good to me.
| if (typeof overrideConfig[config] === 'string' && overrideConfig[config].includes('FILE-STORAGE::')) { | ||
| // pass | ||
| } else if (!isParameterEnabled(flowNodeData.label, config)) { | ||
| if (!isParameterEnabled(flowNodeData.label, config)) { |
There was a problem hiding this comment.
Just a note for future reference, this is breaking change for users that are using /vector/upsert endpoint.
curl http://localhost:3000/api/v1/vector/upsert/d7002e48-8448-4cb6-b09e-c916f92ac889 \
-X POST \
-F "files=@/home/user1/Desktop/example.txt" \
-H "Content-Type: multipart/form-data"
Previously you don't have to explicitly enable files in the Override Configuration. With this changes, now you do.
* Fix Paramater Override Bypass * Update OverrideConfig.jsx * Update VectorStoreDialog.jsx --------- Co-authored-by: Henry Heng <henryheng@flowiseai.com>
FILE-STORAGE::it would bypass validations. This PR removes that check as it was only used for overriding - now it will rely onisParameterEnabledlike in the other validationsNODE_OPTIONSas a dangerous env varTesting
Recreated an issue and ensured it was mitigated locally. Please chat offline with @igor-magun-wd and myself for details.