Skip to content

Commit

Permalink
fix(safety): push exact match for get attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
ArslanSaleem committed Jan 2, 2025
1 parent c58726f commit fdb7985
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pandasai/safe_libs/base_restricted_module.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ def wrapper(*args, **kwargs):
# Check for any suspicious arguments that might be used for importing
for arg in args + tuple(kwargs.values()):
if isinstance(arg, str) and any(
module in arg.lower()
module == arg.lower()
for module in ["io", "os", "subprocess", "sys", "importlib"]
):
raise SecurityError(
Expand Down

0 comments on commit fdb7985

Please sign in to comment.