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

12 ビュー (過去 30 日間)
Anthony Barone
Anthony Barone 2017 年 4 月 21 日
回答済み: Sudarshan Kolar 2017 年 4 月 24 日
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.

回答 (1 件)

Sudarshan Kolar
Sudarshan Kolar 2017 年 4 月 24 日
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

カテゴリ

Help Center および File ExchangeProgramming についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by