Skip to content

The file's signature is invalid #240

Closed

Description

@eugene-falk
Image

Activity

  1. ethanndickson commented on Mar 2, 2026

    @ethanndickson
    Member

    Are you building Coder server (coder/coder) from source? If not, where are you downloading it from?

  2. eugene-falk commented on Mar 2, 2026

    @eugene-falk
    Author

    It's Enterprise/Premium, kubernetes_deployment

  3. ethanndickson commented on Mar 3, 2026

    @ethanndickson
    Member

    @eugene-falk Could you please download the binary directly from your coder deployment: (replacing the coder.example.com)

    curl -fSL "https://coder.example.com/bin/coder-darwin-arm64" -o /tmp/coder-binary
    

    And share the output of all of the following commands?

    file /tmp/coder-binary
    chmod +x /tmp/coder-binary && /tmp/coder-binary --version
    codesign --verify -R="anchor apple generic" /tmp/coder-binary && echo "PASS: signature valid" || echo "FAIL: signature invalid"
    codesign -dvvvv /tmp/coder-binary
    

    Thanks in advance for your help :)

    (I've assumed you're on an arm64 mac, please replace arm64 with amd64 if you're on an Intel mac)

  4. eugene-falk commented on Mar 3, 2026

    @eugene-falk
    Author
    eugenef@eugenef-mbp-1 Downloads % curl -fSL "https://.../bin/coder-darwin-arm64" -o /tmp/coder-binary
      % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                    Dload  Upload   Total   Spent    Left  Speed
    100 47.2M  100 47.2M    0     0   431k      0  0:01:52  0:01:52 --:--:--  723k
    eugenef@eugenef-mbp-1 Downloads %
    eugenef@eugenef-mbp-1 Downloads %
    eugenef@eugenef-mbp-1 Downloads %
    eugenef@eugenef-mbp-1 Downloads % file /tmp/coder-binary
    chmod +x /tmp/coder-binary && /tmp/coder-binary --version
    codesign --verify -R="anchor apple generic" /tmp/coder-binary && echo "PASS: signature valid" || echo "FAIL: signature invalid"
    codesign -dvvvv /tmp/coder-binary
    /tmp/coder-binary: Mach-O 64-bit executable arm64
    Coder v2.29.6-devel+8b2f472f7 Thu Feb  5 22:35:41 UTC 2026
    https://github.com/coder/coder/commit/8b2f472f716e4d2d4bac8aa97f0d16492e339cb6
    
    Slim build of Coder, does not support the  server  subcommand.
    test-requirement: code failed to satisfy specified code requirement(s)
    FAIL: signature invalid
    Executable=/private/tmp/coder-binary
    Identifier=a.out
    Format=Mach-O thin (arm64)
    CodeDirectory v=20400 size=384030 flags=0x20002(adhoc,linker-signed) hashes=11998+0 location=embedded
    VersionPlatform=1
    VersionMin=720896
    VersionSDK=720896
    Hash type=sha256 size=32
    CandidateCDHash sha256=9b7dca7f873c0c115229cb3e98abf68147795f5a
    CandidateCDHashFull sha256=9b7dca7f873c0c115229cb3e98abf68147795f5aae68c7eafbb0dd8a24627938
    Hash choices=sha256
    CMSDigest=9b7dca7f873c0c115229cb3e98abf68147795f5aae68c7eafbb0dd8a24627938
    CMSDigestType=2
    Executable Segment base=0
    Executable Segment limit=24723456
    Executable Segment flags=0x1
    Page size=4096
    CDHash=9b7dca7f873c0c115229cb3e98abf68147795f5a
    Signature=adhoc
    Info.plist=not bound
    TeamIdentifier=not set
    Sealed Resources=none
    Internal requirements=none
    
  5. ethanndickson commented on Mar 3, 2026

    @ethanndickson
    Member

    It would appear the Coder binary on your deployment is unsigned. As a security measure, Coder Desktop does not function unless the binary downloaded from the Coder deployment is signed by Coder, and it matches the version of the server you're connecting. All binaries we release are signed.

    v2.29.6-devel+8b2f472f7 would also suggest this instance of Coder was not officially distributed by us, as I don't believe we release development builds.

    I'll take a quick look to see if we're accidentally distributing this development build.

  6. ethanndickson commented on Mar 3, 2026

    @ethanndickson
    Member

    It looks like we ship unsigned builds on ghcr.io/coder/coder-preview. Does that match your kubernetes deployment? If it does, switching to just ghcr.io/coder/coder (i.e. ghcr.io/coder/coder:v2.29.6) will resolve this issue.

  7. eugene-falk commented on Mar 3, 2026

    @eugene-falk
    Author

    It turns out we are indeed building Coder from source, and we modify parts of the code as part of our internal hardening process.

    Given this setup, do you have any recommendations for making Coder Desktop work in this scenario?

  8. added a commit that references this issue on Mar 9, 2026
    f4251ab
  9. ethanndickson commented on Mar 9, 2026

    @ethanndickson
    Member

    @eugene-falk @farkmarnum

    Could you please try the preview build available in the assets of https://github.com/coder/coder-desktop-macos/releases/tag/preview ? (or via the preview update channel in app settings)

    With this build you'll be able to disable the signature validation via a boolean userdefault, which can be set per-device like:

    defaults write com.coder.Coder-Desktop DangerousDisableCoderSignatureValidation -bool true

    or set for all devices in your org via MDM.

    You'll need to restart the app and relogin after setting the flag for the change to take effect.

    If there's no issues, I'll push a new release with this change.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions