Skip to content

Sanitize Code Ran in Pyodide#5701

Merged
christopherholland-workday merged 3 commits intomainfrom
airtable-code-execution
Feb 6, 2026
Merged

Sanitize Code Ran in Pyodide#5701
christopherholland-workday merged 3 commits intomainfrom
airtable-code-execution

Conversation

@christopherholland-workday
Copy link
Contributor

AirtableAgent and CSVAgent run LLM generated code using Pyodide. We want to limit the code that is run to avoid potential issues. Changes include:

  1. Create pythonCodeValidator that rejects code including imports, dangerous built-in functions, and dangerous modules
  2. Use pythonCodeValidator before running python code in Pyodide
  3. Strengthen the prompts to AirtableAgent and CSVAgent to include security concerns

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 introduces important security enhancements by sanitizing LLM-generated Python code before execution in Pyodide for AirtableAgent and CSVAgent. The changes are well-implemented, including the creation of a pythonCodeValidator with a deny-list of dangerous constructs, and updating the system prompts to guide the LLM towards generating safer code. This multi-layered approach to security is commendable. I have one minor suggestion for code cleanup in the new validator file.

@FlowiseAI FlowiseAI deleted a comment from gemini-code-assist bot Feb 3, 2026
@christopherholland-workday christopherholland-workday merged commit a24acac into main Feb 6, 2026
5 checks passed
vellanki-santhosh pushed a commit to vellanki-santhosh/Flowise that referenced this pull request Feb 17, 2026
* Sanitize Code Ran in Pyodide
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.

3 participants