Skip to content

Use attribute xml for security attribute stripping #96907

Open

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.

Activity

  1. ghost added
    needs-area-label
    on Jan 12, 2024
  2. ghost added
    untriaged
    on Jan 12, 2024
  3. added
    area-Tools-ILLink
    on Jan 12, 2024
  4. removed
    needs-area-label
    on Jan 12, 2024
  5. changed the title [-]Use descriptor xml for security attribute stripping[/-] [+]Use attribute xml for security attribute stripping[/+] on Jan 12, 2024
  6. added this to the 9.0.0 milestone on Apr 25, 2024
  7. removed
    untriaged
    on Apr 25, 2024
  8. modified the milestones: 9.0.0, 10.0.0 on Jul 2, 2024
  9. agocke commented on May 13, 2025

    @agocke
    Member

    Should we just drop support for this entirely? I didn't think we wanted to support attribute trimming at all...

  10. modified the milestones: 10.0.0, Future on Jun 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-Tools-ILLink

    Type

    No type

    Projects

    • Status
      No status

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions