Skip to content

Commit

Permalink
dsl: sandbox: update safe builtins for python < 3.10
Browse files Browse the repository at this point in the history
  • Loading branch information
aszs committed Sep 16, 2023
1 parent 5c2e2c6 commit ebb4679
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions tosca-package/tosca/python2yaml.py
Original file line number Diff line number Diff line change
Expand Up @@ -358,12 +358,10 @@ def restricted_exec(
tosca_builtins["__import__"] = safe_import if safe_mode else __import__
# we don't restrict read access so add back the safe builtins
# missing from safe_builtins, only exclude the following:
# "breakpoint", "compile", "delattr", "dir", "eval", exec, exit, quite, print
# "aiter", "anext", "breakpoint", "compile", "delattr", "dir", "eval", exec, exit, quite, print
# "globals", "locals", "open", input, setattr, vars, license, copyright, help, credits
for name in [
"aiter",
"all",
"anext",
"any",
"ascii",
"bin",
Expand Down

0 comments on commit ebb4679

Please sign in to comment.