Save source files commands should run inside the jail environment
Closed this issue · 1 comments
andredias commented
In order to prevent security issues in malicious file paths, the source file creation should run inside a jail environment, where only /sandbox
and /tmp
directories are writeable. No additional security checks will be necessary.
andredias commented
Passing the file contents to nsjail.execute
command proved to be tricky. One alternative is to save it into a temporary file and then, try to rename it inside the jail environment.
The simplest solution so far is to make save_sources
routine stronger by checking for malicious or malformed paths.