Skip to content

Security issues with using yaegi in production? And how do i work around them? #1463

Answered by mvertes
ishaan812 asked this question in Q&A
Discussion options

You must be logged in to vote

In a nutshell, here is what we do in Yaegi to address security in presence of untrusted scripts:

  • No access to unsafe package: a script has no simple way to access and manipulate memory outside its scope.
  • Sensitive system calls are disabled or virtualised: call to os.Exit() doesn't exit, it just terminates the interpreter. os/exec is simply disabled, as for some syscall (i.e. fork(), etc.
  • All panics are catched and propagated to the interpreter caller function in host. Again, there is no obvious way for a script to terminate the host process.
  • standard input, output and error are per interpreter session, independent of host. It applies to multiple stdlib packages, such as fmt, log, etc.
  • En…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by mvertes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants