Core: Add security to C++ scripted options. Idea by @LilleCarl