contrib: detached-sig-create.sh passes the signing passphrases as arguments #36651

issue fametrano opened this issue on October 24, 2026
  1. fametrano commented at 12:56 PM on October 24, 2026: none

    contrib/macdeploy/detached-sig-create.sh reads two passphrases and passes them to signapple with --passphrase. Every sign call gets the code signing key passphrase. Every notarize call gets the App Store Connect key passphrase. While a call runs, its passphrase is in the process arguments, which ps shows. contrib/windeploy/detached-sig-create.sh passes its key passphrase to osslsigncode sign with -pass. Both came in with #31407.

    On Windows, the script could pipe the passphrase to osslsigncode sign -readpass -, which reads it from stdin. osslsigncode 2.14, the version Guix pins, has -readpass. On macOS, signapple takes the passphrase only from --passphrase or from a prompt (3fab3bb, its master and the Guix pin). Without --passphrase it would prompt once per call. So signapple would first need an option that reads the passphrase from a file descriptor, a file or the environment.

    I ran the macOS script with a stub signapple that prints its own ps line, and each passphrase appeared there. I did not run either script with the real tools or keys. Would the codesigners take a change along these lines?

    I found this during a large audit of Bitcoin Core that I did with the help of LLM tools. I understand the scripts and will answer questions myself.

  2. maflcko added the label Build system on Oct 26, 2026
  3. Steeve-Crypto commented at 12:29 PM on October 31, 2026: none

    I'd like to pick this up for the Windows side: change detached-sig-create.sh to pass the passphrase to osslsigncode through stdin with -readpass instead of as an argument. I understand the signapple side needs an upstream change first, so I'd keep this PR to the osslsigncode part unless you'd prefer it handled differently.

  4. fametrano commented at 6:28 PM on November 1, 2026: none

    That's fine with me, please go ahead with the osslsigncode part. Whether the codesigners want the change is still theirs to say.

  5. Steeve-Crypto commented at 4:59 AM on November 2, 2026: none

    Thanks! Opened #36722 for the osslsigncode part. I'll leave the macOS side for once signapple supports it.

  6. hebasto commented at 12:15 PM on November 2, 2026: member

    I believe those two scripts operate under the assumption that the codesigner’s machine is single-user and not compromised.

    cc codesigners: @pinheadmz @achow101

  7. pinheadmz commented at 3:12 PM on November 2, 2026: member

    Can confirm the passphrase appears briefly in the ps list during codesigning and maybe that's worth fixing. The key itself remains in an encrypted volume at rest and as Hebasto says the assumption is the signers machine is safe. I'm happy to test out a more secure process though.

  8. maflcko commented at 11:22 AM on November 4, 2026: member

    In theory this could protect against a maintainer running this script and at the same time running htop or ps and then sharing that output, but this should be cosmically rare. Let's move discussion to #36722 and then either close or merge that.

  9. maflcko closed this on Nov 4, 2026


github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-11-16 00:51 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me