Make foreign import safety configurable