You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Upgrades macOS ad-hoc codesigning to include JIT entitlements and signature verification, as recommended by the Bun docs. Without proper entitlements, Gatekeeper can reject the binary or JIT execution silently fails.
Changes
entitlements.plist (new) — JIT and memory-safety entitlements required by Bun executables:
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR enhances macOS code signing for Bun executables by adding JIT entitlements and signature verification, addressing Gatekeeper and runtime requirements. The changes follow the Bun documentation's recommendations for executable code signing.
Changes:
Adds entitlements.plist with five JIT-related security entitlements required by Bun's runtime
Updates build.ts to pass entitlements to codesign via --entitlements flag and adds --deep flag for recursive signing
Adds post-signing verification step with codesign --verify --verbose to catch signing failures early
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
File
Description
entitlements.plist
New plist file defining JIT and memory-related entitlements required for Bun executables on macOS
build.ts
Enhanced codesign command with entitlements, deep signing, and post-sign verification step
The reason will be displayed to describe this comment to others. Learn more.
The --deep flag is intended for signing nested code in bundles (like .app bundles with frameworks). For a single standalone executable binary, this flag is unnecessary and may cause issues in some scenarios. Consider removing --deep unless there's a specific reason to sign nested components.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Upgrades macOS ad-hoc codesigning to include JIT entitlements and signature verification, as recommended by the Bun docs. Without proper entitlements, Gatekeeper can reject the binary or JIT execution silently fails.
Changes
entitlements.plist(new) — JIT and memory-safety entitlements required by Bun executables:cs.allow-jit,cs.allow-unsigned-executable-memory,cs.disable-executable-page-protection,cs.allow-dyld-environment-variables,cs.disable-library-validationbuild.ts— improvedcodesigninvocation:--deepfor full binary signing--entitlementspointing toentitlements.plist(resolved viaimport.meta.dirfor CWD-independence)--verify --verbosestep to fail fast on invalid signaturesHow did you verify your code works?
Signing runs only on
darwinhosts in CI (macos-latestrunners incd.yaml) — the updated command will be exercised on the next tagged release build.Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
bun.com/home/REDACTED/work/_temp/ghcca-node/node/bin/node /home/REDACTED/work/_temp/ghcca-node/node/bin/node --enable-source-maps /home/REDACTED/work/_temp/copilot-developer-action-main/dist/index.js(dns block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.