tags:

views:

69

answers:

1

We have a third party library referenced in our project, but without access to the source I don't really know what it's doing under the hood and there's too much code to check it out with Reflector.

Is there any easy way to completely sandbox it so it can't access the file system, network, registry etc.?

I'm trying to get up to speed with security, but it's a huge topic.

A: 

http://www.csharp411.com/executing-code-in-partial-trust-environments/

Look at configuring the assembly for partial trust. The article should give you the basics to help you get started... (or to know where else to look)

Hope this helps!

jwwishart
Thanks. Basically we have an application which runs in a full trust environment, but the third party tool which will ship with it we DON'T trust in the slightest. Basically we want to make sure it can't do anything malicious with the registry, file system etc. I managed to achieve this by imperatively denying all sorts of permissions before we make calls into the assembly, but surely there must be an eaiser way? Looks like I have some reading to do.
LMC
Why are you using it in the first place if you don't trust it?
logicnp