Is there a way to limit file and internet access in Matlab?

13 visualizaciones (últimos 30 días)
Anthony Barone
Anthony Barone el 21 de Abr. de 2017
Respondida: Sudarshan Kolar el 24 de Abr. de 2017
The use case I am thinking of is:
If you are running code that you found online, it might be smart to run it in an "isolated" version of Matlab, just in case someone snuck in any malicious lines of code.
It seems like blocking internet access and restricting file access to the current directory (and perhaps any subdirectories within the current directory) would provide a "safe space" to test a code, and shouldn't be problematic for the vast majority of the vast majority of codes. Ideally, if any directories outside of the current one absolutely required file access (such as where the main Matlab program files are stored) then these would be set to read-only.
Is there any good way to accomplish this?
Thankfully I haven't had any issues with this type of thing, but I recently saw it suggested somewhere that you should carefully go through any code you didn't personally write to check for any malicious code, which is something that I hadn't even considered. While going through code you didn't write is a good idea regardless, there is still the possibility that you overlook something and/or that the code is just too long and complex to go through line-by-line, so setting up an isolated space to run the code (at least for the 1st time you run it) seems like a good safety measure.

Respuestas (1)

Sudarshan Kolar
Sudarshan Kolar el 24 de Abr. de 2017
Hello Anthony,
I understand that you want to run an isolated version of Matlab. You can use Matlab online or Matlab running in a remoted PC for such scripts/models. To the best of my knowledge, Matlab does not seem to have the feature to restrict internet and file access.
Sudarshan

Categorías

Más información sobre Programming en Help Center y File Exchange.

Productos

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by