I'm writing a plug-in system that requires me to load .net DLLs into an environment. I need to know whether or not they contain any pointer usage or any other usage of the "unsafe" keyword. I have a good reflection browswer running so that I can look up all the types in the assembly, all the methods, all the external references and even all the CIL instructions in the DLL. To my knowledge however, the unsafe keyword is not kept around after it's been used to determine whether or not the DLL may be compiled.
Is there a place in the meta data where the unsafe tag persists? Are there specific CIL instructions that are unsafe? Is there another way to determine that a random DLL has unsafe code?
Of course unsafe code is not the only security concern, but it's the one I'm trying to deal with right now.