Skip to content

Use attribute xml for security attribute stripping #96907

Open
@sbomer

Description

@sbomer

Context: https://github.com/dotnet/runtime/pull/96363/files#r1449983607

ILLink has a hard-coded list of security attributes to remove:

switch (attr_type.Name) {
case "SecurityCriticalAttribute":
case "SecuritySafeCriticalAttribute":
case "SuppressUnmanagedCodeSecurityAttribute":
case "DynamicSecurityMethodAttribute":
case "UnverifiableCodeAttribute":
case "AllowPartiallyTrustedCallersAttribute":
case "SecurityTransparentAttribute":
case "SecurityRulesAttribute":

We should consider using the same approach we use for other attributes (the ILLink.LinkAttributes.xml) for consistency, and to get the same behavior in NativeAot.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-Tools-ILLink.NET linker development as well as trimming analyzers

    Type

    No type

    Projects

    Status

    No status

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions