Skip to content

Update ad-hoc signing in HostModel for changed codesign behaviour in macOS 26 #121825

Closed

Description

@elinor-fung

It looks like the new behavior of codesign is to only hash the __TEXT segment, whereas it used to hash the entire file. It looks like this doesn't affect whether or not Mac allows the file to be run. We could disable the test to get this in and file an issue for the fix. It may be simple enough for copilot.

Originally posted by @jtschuster in #121373 (comment)

The MatchesCodesignOutput test was temporarily disabled due a change in the behaviour of codesign in macOS 26.

[Theory(Skip = "Temporarily disabled due to macOS 26 codesign behavior change - only hashing __TEXT segment")]
[MemberData(nameof(GetTestFilePaths), nameof(MatchesCodesignOutput))]
[PlatformSpecific(TestPlatforms.OSX)]
void MatchesCodesignOutput(string filePath, TestArtifact _)

We should update the ad-hoc signing in HostModel to account for this new behaviour and re-enable the tests. The end result should work on both macOS 26 and macOS 15.

Activity

  1. added
    untriaged
    on Nov 19, 2025
  2. added
    needs-area-label
    on Nov 19, 2025
  3. added and removed
    untriaged
    needs-area-label
    on Nov 19, 2025
  4. added this to the 11.0.0 milestone on Nov 19, 2025
  5. dotnet-policy-service commented on Nov 19, 2025

    @dotnet-policy-service
    Contributor

    Tagging subscribers to this area: @vitek-karas, @agocke
    See info in area-owners.md if you want to be subscribed.

  6. dotnet-policy-service commented on Apr 9, 2026

    @dotnet-policy-service
    Contributor

    Tagging subscribers to this area: @agocke, @jeffschwMSFT, @elinor-fung
    See info in area-owners.md if you want to be subscribed.

  7. changed the title [-]Update ad-hoc signing in HostModel to only hash the `__TEXT` segment[/-] [+]Update ad-hoc signing in HostModel for changed codesign behaviour in macOS 26[/+] on Jul 23, 2026
  8. added a commit that references this issue on Jul 24, 2026
    46cb84d
  9. added a commit that references this issue on Jul 26, 2026
    3484b70
  10. locked and limited conversation to collaborators on Aug 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

  • Status
    No status

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions