macOS signing follow-ups: source-built agent identity, plist validation, secret scope

Open
#2,244 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
42/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
github-actions, go, macos

Research direction

Read the macOS launchd plist in deployment/macos/, the make build-metal-agent and make install-metal-agent targets, and internal/machoplist with scripts/macos-sign_test.sh. Start by checking the plist identity and validatePlist behavior, then inspect the GoReleaser signing environment and local fallback. Done means all four follow-ups are addressed and the fallback is exercised with a real build.

Written by the indexing model from the issue text.

Description

ci enhancement metal-agent priority/low

Follow-ups from the review of #2233 (signing and notarizing the macOS binaries). None of these blocks #2233.

  • make install-metal-agent installs a plist naming a bundle identifier the binary lacks. The launchd plist in deployment/macos/ now carries AssociatedBundleIdentifiers = dev.llmkube.metal-agent, but make build-metal-agent embeds no Info.plist and keeps the linker's ad-hoc signature, so a source-built agent has a different identifier. Either embed the plist and sign ad-hoc in the Makefile target (with cmd/machoplist and codesign), or drop the key from the plist the Makefile installs.
  • validatePlist accepts content after the root element. internal/machoplist checks that the plist decodes, but a template with trailing bytes after </plist> passes. Reject anything but whitespace after the root element.
  • The signing certificate reaches the whole GoReleaser process. MACOS_SIGN_P12 and MACOS_SIGN_PASSWORD are in the GoReleaser step's environment, so every hook and build command can read them, not just hack/macos-sign.sh. Passing them only to the hook (for example through a file the step writes with 0600 and the hook reads) would narrow that. The notary key no longer reaches GoReleaser.
  • The go run ./cmd/machoplist fallback is not exercised by a release. The release always sets MACHOPLIST; the fallback runs only locally. scripts/macos-sign_test.sh checks its arguments with a stubbed go, but not that it builds and embeds for real.
Dominant language
Go
Stars
232
Forks
37
Avg merge
21h 42m
Merged PRs (30d)
244

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from defilantech/LLMKube

All issues in defilantech/LLMKube

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.