title: Run C++ in VM, Securely
body: <p>So, I am making a online application that user's can submit code and the output will be shown to the user. I have made Security a top priority and have taken the following steps to make sure that the code runs securely:</p>
  
  <ul>
  <li>Running the code on a VM, On a VPS that's only use is to run these VM's. These VM's do not allow any networking or file access past the working directory.</li>
  <li><p>Using the following G++ flags:</p>
  
  <pre><code>-O -std=c++98 -pedantic-errors -Wfatal-errors -Werror -Wall -Wextra -Wno-missing-field-initializers -Wwrite-strings -Wno-deprecated -Wno-unused -Wno-non-virtual-dtor -Wno-variadic-macros -fmessage-length=0 -ftemplate-depth-128 -fno-merge-constants -fno-nonansi-builtins -fno-gnu-keywords -fno-elide-constructors -fstrict-aliasing -fstack-protector-all -Winvalid-pch
  </code></pre></li>
  </ul>
  
  <p>My Question I guess is really how can I make this any more secure? Do you personally see any problems with this approach?</p>