Skip to content

[Operational Issue]: NativeAOT'd executables in dotnet sdk need to be signed and have hardened runtime enabled #7194

Closed

Description

@akoeplinger

Error

A recent signed test build revealed the following failures from Apple's Notarization service. This is because the native binares (dotnet-dev-certs, dotnet-user-secrets and dotnet-user-jwts) aren't signed/hardened.

{
  "logFormatVersion": 1,
  "jobId": "8e88725a-ce27-4b54-8a15-f10e9ec92950",
  "status": "Invalid",
  "statusSummary": "Archive contains critical validation errors",
  "statusCode": 4000,
  "archiveFilename": "dotnet-sdk-11.0.100-preview.6.26311.102-osx-x64.pkg",
  "uploadDate": "2026-06-11T13:29:01.418Z",
  "sha256": "5cb37f818b9ae78685cc38a5a1337678b3ade8f30656818df08d8f2eab772fe4",
  "ticketContents": null,
  "issues": [
    {
      "severity": "error",
      "code": null,
      "path": "dotnet-sdk-11.0.100-preview.6.26311.102-osx-x64.pkg/com.microsoft.dotnet.dev.11.0.100-preview.6.26311.102.component.osx.x64.pkg Contents/Payload/usr/local/share/dotnet/sdk/11.0.100-preview.6.26311.102/DotnetTools/dotnet-dev-certs/11.0.0-preview.6.26311.102/tools/net11.0/osx-x64/dotnet-dev-certs",
      "message": "The binary is not signed.",
      "docUrl": "https://developer.apple.com/documentation/security/notarizing_macos_software_before_distribution/resolving_common_notarization_issues#3087721",
      "architecture": "x86_64"
    },
    {
      "severity": "error",
      "code": null,
      "path": "dotnet-sdk-11.0.100-preview.6.26311.102-osx-x64.pkg/com.microsoft.dotnet.dev.11.0.100-preview.6.26311.102.component.osx.x64.pkg Contents/Payload/usr/local/share/dotnet/sdk/11.0.100-preview.6.26311.102/DotnetTools/dotnet-dev-certs/11.0.0-preview.6.26311.102/tools/net11.0/osx-x64/dotnet-dev-certs",
      "message": "The signature does not include a secure timestamp.",
      "docUrl": "https://developer.apple.com/documentation/security/notarizing_macos_software_before_distribution/resolving_common_notarization_issues#3087733",
      "architecture": "x86_64"
    },
    {
      "severity": "error",
      "code": null,
      "path": "dotnet-sdk-11.0.100-preview.6.26311.102-osx-x64.pkg/com.microsoft.dotnet.dev.11.0.100-preview.6.26311.102.component.osx.x64.pkg Contents/Payload/usr/local/share/dotnet/sdk/11.0.100-preview.6.26311.102/DotnetTools/dotnet-dev-certs/11.0.0-preview.6.26311.102/tools/net11.0/osx-x64/dotnet-dev-certs",
      "message": "The executable does not have the hardened runtime enabled.",
      "docUrl": "https://developer.apple.com/documentation/security/notarizing_macos_software_before_distribution/resolving_common_notarization_issues#3087724",
      "architecture": "x86_64"
    },
    {
      "severity": "error",
      "code": null,
      "path": "dotnet-sdk-11.0.100-preview.6.26311.102-osx-x64.pkg/com.microsoft.dotnet.dev.11.0.100-preview.6.26311.102.component.osx.x64.pkg Contents/Payload/usr/local/share/dotnet/sdk/11.0.100-preview.6.26311.102/DotnetTools/dotnet-user-secrets/11.0.0-preview.6.26311.102/tools/net11.0/osx-x64/dotnet-user-secrets",
      "message": "The binary is not signed.",
      "docUrl": "https://developer.apple.com/documentation/security/notarizing_macos_software_before_distribution/resolving_common_notarization_issues#3087721",
      "architecture": "x86_64"
    },
    {
      "severity": "error",
      "code": null,
      "path": "dotnet-sdk-11.0.100-preview.6.26311.102-osx-x64.pkg/com.microsoft.dotnet.dev.11.0.100-preview.6.26311.102.component.osx.x64.pkg Contents/Payload/usr/local/share/dotnet/sdk/11.0.100-preview.6.26311.102/DotnetTools/dotnet-user-secrets/11.0.0-preview.6.26311.102/tools/net11.0/osx-x64/dotnet-user-secrets",
      "message": "The signature does not include a secure timestamp.",
      "docUrl": "https://developer.apple.com/documentation/security/notarizing_macos_software_before_distribution/resolving_common_notarization_issues#3087733",
      "architecture": "x86_64"
    },
    {
      "severity": "error",
      "code": null,
      "path": "dotnet-sdk-11.0.100-preview.6.26311.102-osx-x64.pkg/com.microsoft.dotnet.dev.11.0.100-preview.6.26311.102.component.osx.x64.pkg Contents/Payload/usr/local/share/dotnet/sdk/11.0.100-preview.6.26311.102/DotnetTools/dotnet-user-secrets/11.0.0-preview.6.26311.102/tools/net11.0/osx-x64/dotnet-user-secrets",
      "message": "The executable does not have the hardened runtime enabled.",
      "docUrl": "https://developer.apple.com/documentation/security/notarizing_macos_software_before_distribution/resolving_common_notarization_issues#3087724",
      "architecture": "x86_64"
    },
    {
      "severity": "error",
      "code": null,
      "path": "dotnet-sdk-11.0.100-preview.6.26311.102-osx-x64.pkg/com.microsoft.dotnet.dev.11.0.100-preview.6.26311.102.component.osx.x64.pkg Contents/Payload/usr/local/share/dotnet/sdk/11.0.100-preview.6.26311.102/DotnetTools/dotnet-user-jwts/11.0.0-preview.6.26311.102/tools/net11.0/osx-x64/dotnet-user-jwts",
      "message": "The binary is not signed.",
      "docUrl": "https://developer.apple.com/documentation/security/notarizing_macos_software_before_distribution/resolving_common_notarization_issues#3087721",
      "architecture": "x86_64"
    },
    {
      "severity": "error",
      "code": null,
      "path": "dotnet-sdk-11.0.100-preview.6.26311.102-osx-x64.pkg/com.microsoft.dotnet.dev.11.0.100-preview.6.26311.102.component.osx.x64.pkg Contents/Payload/usr/local/share/dotnet/sdk/11.0.100-preview.6.26311.102/DotnetTools/dotnet-user-jwts/11.0.0-preview.6.26311.102/tools/net11.0/osx-x64/dotnet-user-jwts",
      "message": "The signature does not include a secure timestamp.",
      "docUrl": "https://developer.apple.com/documentation/security/notarizing_macos_software_before_distribution/resolving_common_notarization_issues#3087733",
      "architecture": "x86_64"
    },
    {
      "severity": "error",
      "code": null,
      "path": "dotnet-sdk-11.0.100-preview.6.26311.102-osx-x64.pkg/com.microsoft.dotnet.dev.11.0.100-preview.6.26311.102.component.osx.x64.pkg Contents/Payload/usr/local/share/dotnet/sdk/11.0.100-preview.6.26311.102/DotnetTools/dotnet-user-jwts/11.0.0-preview.6.26311.102/tools/net11.0/osx-x64/dotnet-user-jwts",
      "message": "The executable does not have the hardened runtime enabled.",
      "docUrl": "https://developer.apple.com/documentation/security/notarizing_macos_software_before_distribution/resolving_common_notarization_issues#3087724",
      "architecture": "x86_64"
    }
  ]
}

Links

No response

Root Cause

unknown

Blocking

  • This issue is blocking

Affected Releases

  • .NET 10
  • .NET 10 (SDK band build)
  • .NET 11

Activity

  1. akoeplinger commented on Jun 11, 2026

    @akoeplinger
    MemberAuthor

    @DamianEdwards @baronfel two things need to happen:

    1. Add the binary file names to src/sdk/eng/Signing.props, similar to

      <!-- Roslyn apphosts -->
      <FileSignInfo Condition="'$(TargetOS)' == 'osx'" Include="csc;vbc;VBCSCompiler" CertificateName="MacDeveloperHarden" />
      <!-- MSBuild apphost -->
      <FileSignInfo Condition="'$(TargetOS)' == 'osx'" Include="MSBuild" CertificateName="MacDeveloperHarden" />

    2. Add ad-hoc codesign call to add the entitlements, similar to

      <Exec Command="codesign --sign - --force --entitlements '$(MSBuildProjectDirectory)/msbuild-entitlements.plist' %(_MSBuildAppHost.RootDir)%(_MSBuildAppHost.Directory)%(_MSBuildAppHost.Filename)$(ExeExtension)"
      Condition="$(SharedFrameworkRid.StartsWith('osx'))" />

    I think this should be done in the sdk repo instead of aspnetcore since these tools don't ship outside of the sdk right?

  2. akoeplinger commented on Jun 11, 2026

    @akoeplinger
    MemberAuthor

    #7131 is adding another binary

  3. akoeplinger commented on Jun 11, 2026

    @akoeplinger
    MemberAuthor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions