Skip to content

Commit

Permalink
comment out exec() method because of securith issues
Browse files Browse the repository at this point in the history
  • Loading branch information
pplonski committed Feb 14, 2025
1 parent 7a95b06 commit bdcfb13
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion plotai/code/executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,12 @@ def run(self, code, globals_env=None, locals_env=None):
if not line.startswith("```"):
tmp_code += line + "\n"

exec(tmp_code, globals_env, locals_env)
# please be aware of security issue with exec functions
# LLM can execute arbitrary code
# if you are aware of security issues, please uncomment below line

# exec(tmp_code, globals_env, locals_env)

except Exception as e:
return str(e)
return None

0 comments on commit bdcfb13

Please sign in to comment.