Skip to content

Gendarme.Rules.Security.Cas.ReviewSuppressUnmanagedCodeSecurityUsageRule(2.10)

Sebastien Pouliot edited this page Feb 9, 2011 · 3 revisions

ReviewSuppressUnmanagedCodeSecurityUsageRule

Assembly: Gendarme.Rules.Security.Cas
Version: 2.10

Description

This rule fires if a type or method is decorated with the SuppressUnmanagedCodeSecurity attribute. This attribute reduces the security checks done when executing unmanaged code and its usage should be reviewed to confirm that no exploitable security holes are present.

Examples

Example:

[SuppressUnmanagedCodeSecurity]
public class Safe {
    [DllImport ("User32.dll")]
    static extern Boolean MessageBeep (UInt32 beepType);
}

Notes

  • This is an Audit rule. As such it does not check for valid or invalid patterns but warns about a specific problem that needs to be reviewed by someone.
Clone this wiki locally