Skip to content

Code-signing entitlements needed for OSX #2393

Closed

Description

@develerltd

Describe the bug
Without the appropriate codesign entitlements, OSX will kill any go processes attempting to compile a wasm file.

To Reproduce
Download a codesigned golang app utilising wazero that attempts to compile a wasm file.
The operating system will kill the process.

Expected behavior
It compiles and continues as normal.

Environment (please complete the relevant information):

  • Go version: [e.g. 1.24.2]
  • Host architecture: OSX Arm64
  • Runtime mode: Compiler

Additional context
The solution will be to document this as a requirement when developing any wazero application on mac osx.

The entitlements appear to be as follows:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>com.apple.security.cs.allow-jit</key>
    <true/>
    <key>com.apple.security.cs.allow-unsigned-executable-memory</key>
    <true/>
</dict>
</plist>

Activity

  1. sirily11 commented on May 13, 2025

    @sirily11

    Definitely need to include this in the documentation. Struggle with this issue for whole day and then found this GitHub issue

  2. ncruces commented on May 13, 2025

    @ncruces
    Contributor

    @sirily11 does the posted solution work for you?

    I can stand up a PR adding that to the README, or you can put one up yourselves.

  3. evacchi commented on May 13, 2025

    @evacchi
    Member

    hey @sirily11 are you able to share a reproducer for this? i.e. an executable that exhibits this behavior? This makes sense to me, but I just wanted to double-check.

  4. sirily11 commented on May 31, 2025

    @sirily11

    @sirily11 does the posted solution work for you?

    I can stand up a PR adding that to the README, or you can put one up yourselves.

    Yes, this document helped me fix my issue. I am building a simple Go application using this package for extensibility. The app crashed every time I ran it on another laptop, but it worked on mine.

    Then I found this issue, attached the entitlement file, and performed the codesign on my host application:

    codesign --force --options runtime --timestamp --entitlements "$(dirname "$0")/app.entitlements" --sign "${SIGNING_CERTIFICATE_NAME}" "${BINARY_PATH}"
    

    After that, the issue was resolved. Simple and effective.

  5. added a commit that references this issue on Oct 29, 2025
    205a3dd
  6. added a commit that references this issue on Oct 29, 2025
    f6f832a
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

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions