Skip to content

Defender for Cloud CLI fails on macOS Tahoe #1037

Description

Describe the bug
Defender for Cloud CLI fails on macOS Tahoe:

❯ defender
Failed to create CoreCLR, HRESULT: 0x80070008

To Reproduce
Steps to reproduce the behavior:

  1. Install the latest defender for cloud cli for macos on a macos 15 device.
  2. execute defender
  3. See error

Expected behavior
I expect to see the usage information

Additional context
Resigning the app with entitlements works. It appears hardened security was enabled on the project but the entitlements are missing.

steps to fix:

  • create an entitlements file
    cat > "$HOME/Desktop/dotnet-entitlements.plist" <<'EOF'
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "https://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/>
        <key>com.apple.security.cs.disable-library-validation</key>
        <true/>
    </dict>
    </plist>
    EOF
  • cp binary to create a "patched" copy
  • Re-sign with entitlements:
    codesign --force --deep --sign - --options runtime --entitlements "$HOME/Desktop/dotnet-entitlements.plist" $PATCHED_DEFENDER_COPY_PATH
  • new binary should now run without issue

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions