Skip to content

Commit

Permalink
experimental change
Browse files Browse the repository at this point in the history
  • Loading branch information
dparmar18 committed Apr 2, 2024
1 parent 6fb4b43 commit 292a428
Showing 1 changed file with 1 addition and 22 deletions.
23 changes: 1 addition & 22 deletions teuthology/suite/fragment-merge.lua
Original file line number Diff line number Diff line change
@@ -1,24 +1,3 @@
-- allow only some Lua (and lunatic) builtins for use by scripts
local lua_allowlist = {
require = require,
assert = assert,
error = error,
ipairs = ipairs,
next = next,
pairs = pairs,
tonumber = tonumber,
tostring = tostring,
py_attrgetter = python.as_attrgetter,
py_dict = python.builtins.dict,
py_list = python.builtins.list,
py_tuple = python.builtins.tuple,
py_enumerate = python.enumerate,
py_iterex = python.iterex,
py_itemgetter = python.as_itemgetter,
math = math,
}
lua_allowlist.__index = lua_allowlist

-- accept a fragment/config (or just return true from the script!)
local function accept()
coroutine.yield(true)
Expand Down Expand Up @@ -79,7 +58,7 @@ function new_script(script, log, deep_merge, yaml_load)
log = log,
reject = reject,
yaml_load = yaml_load,
}, lua_allowlist)
}, {__index = _G})

-- avoid putting check_filters in _ENV
-- try to keep line numbers correct:
Expand Down

0 comments on commit 292a428

Please sign in to comment.