contrib: ci: Monitor Windows signing certificate expiry #36673

pull willcl-ark wants to merge 1 commits into bitcoin:master from willcl-ark:code-cert-ci changing 2 files +193 −0
  1. willcl-ark commented at 10:14 AM on October 27, 2026: member

    Currently we have no automation in place to check that our code signing certificates are not expired or close to expiry. We have previously "relied on Release Candidates" as a dry-run for codesigners to realise that a certificate has expired and have time to fix it. "Noticing during RC cycle" also might not be appropriate in the future if we release more bugfix minor/patch releases on short notice.

    In place of this process we can run a weekly CI job which will check the certificate's validity and open an issue when it passes an expiry threshold.

    In this draft we only check the windows cert (as I couldn't find a mac one) and we set the alert threshold to 90 days.

    When the threshold is passed, the job will open an issue in this repo (optionally tagging relevant key-holders).

  2. DrahtBot commented at 10:14 AM on October 27, 2026: contributor

    <!--e57a25ab6845829454e8d69fc972939a-->

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    <!--006a51241073e994b41acfe9ec718e94-->

    External sites

    <!--021abf342d371248e50ceaed478a90ca-->

    Reviews

    See the guideline and AI policy for information on the review process.

    Type Reviewers
    ACK hebasto
    Stale ACK achow101

    If your review is incorrectly listed, please copy-paste <code>&lt;!--meta-tag:bot-skip--&gt;</code> into the comment that the bot should ignore.

    <!--5faf32d7da4f0f540f40219e4f7537a3-->

  3. willcl-ark commented at 10:16 AM on October 27, 2026: member

    I've tested a run in my fork here with an increased threshold of 365 days to trigger posting an issue which was correctly opened here.

  4. fanquake added the label Windows on Oct 27, 2026
  5. hebasto commented at 10:43 AM on October 27, 2026: member

    ... we set the alert threshold to 30 days.

    What's the rationale for this length period?

  6. willcl-ark commented at 10:45 AM on October 27, 2026: member

    ... we set the alert threshold to 30 days.

    What's the rationale for this length period?

    There is no current rationale for this, it's a placeholder for now. It depends I guess on the average lead-time to obtain updated keys.

  7. achow101 commented at 1:20 PM on October 27, 2026: member

    It depends I guess on the average lead-time to obtain updated keys.

    The lead time has been anywhere between a couple days, to about 2.5 months, depending on whether a change of CA and signing org was necessary.

  8. willcl-ark force-pushed on Oct 27, 2026
  9. willcl-ark commented at 3:57 PM on October 27, 2026: member

    The lead time has been anywhere between a couple days, to about 2.5 months, depending on whether a change of CA and signing org was necessary.

    Bumped the placeholder example threshold to 90 days.

  10. in .github/workflows/code-signing-certificate.yml:38 in 1760a02463
      33 | +          GH_REPO: bitcoin/bitcoin
      34 | +        shell: bash
      35 | +        run: |
      36 | +          CERT=contrib/windeploy/win-codesign.cert
      37 | +          WARNING_DAYS=90
      38 | +          # The first certificate in the PEM bundle is the code signing certificate.
    


    hebasto commented at 6:53 PM on October 29, 2026:

    Is anything enforcing that order?


    willcl-ark commented at 6:59 PM on October 29, 2026:

    There is not (nice question).

    The only way I know to "check" which is which, without hardcoding, is to check CA:FALSE to at least rule out that its a cert authority.

    I can push a change to this perhaps.


    willcl-ark commented at 8:57 PM on October 29, 2026:

    Amended slightly in b7e371b634a


    achow101 commented at 3:50 AM on November 3, 2026:

    My recollection is that osslsigncode requires it in this order, so if it were in any other order, code signing in general wouldn't work.

  11. hebasto commented at 7:06 PM on October 29, 2026: member

    Alternatively, we could amend the release process as suggested in #36695 (comment).

  12. willcl-ark commented at 7:08 PM on October 29, 2026: member

    Alternatively, we could amend the release process as suggested in #36695 (comment).

    Yep! No skin off my back either way; happy with either approach.

  13. willcl-ark force-pushed on Oct 29, 2026
  14. fanquake commented at 8:56 PM on October 29, 2026: member

    Alternatively, we could amend the release process as suggested in

    Can you explain what that solves? The certs are constantly used to produce (point) releases, not just major releases, so always need to work (particularly in the case of expedited releases, like this week).

    A note in an issue telling someone to manually look at the cert at an arbitrary future time is not useful if we want to know the cert works for a deployment tomorrow.

  15. maflcko commented at 9:15 PM on October 29, 2026: member

    I think the idea was to include a new section, which is either:

    2027-01-04 Update Windows signing cert 🚧

    • Expires 2027-MM-DD

    or:

    2027-01-04 Update Windows signing cert :heavy_check_mark:

    • Expires 2029-MM-DD, not needed

    Maybe a script can be added for this to make it easier to run, if needed. Trusting the CI to create such an issue (which I presume happens less than once a year) seems more brittle? But no strong opinion.

  16. DrahtBot added the label CI failed on Oct 29, 2026
  17. DrahtBot removed the label CI failed on Oct 30, 2026
  18. fanquake commented at 10:36 AM on October 30, 2026: member

    I think the idea was to include a new section, which is either:

    Ok. I think the point of this PR is to try and move away from manual tasks that (hopefully) someone will remember to do, and more towards (automated) assurance that we can use the certs (my understanding is that the cert could also be revoked arbitrarily, along with normal expiration). Having this assurance would mean one less thing that an rc cycle needs to "check". Adding a note seems fine, but that seems to assume the cert is always valid?

    I think we should also add a similar check for macOS code-signing, given that is more prone to breakage (needs manual intervention multiple time a year to accept updated T&Cs). An automated check makes more sense in this case, because the breakage is somewhat arbitrary.

  19. willcl-ark commented at 10:37 AM on October 30, 2026: member

    I think we should also add a similar check for macOS code-signing

    To my knowledge the cert is not checked into this repo? but otherwise can trivially add the second check.

  20. maflcko commented at 11:55 AM on October 30, 2026: member

    I am just a bit unsure if some random bash encoded in a string inside a yaml inside a mutable GHA VM inside some MS datacenter that requires a GHA write token to create an issue over the API is more reliable than the status quo. Again, no strong opinion, but the script should probably be stand-alone, so that it can be run locally?

  21. achow101 commented at 3:55 AM on November 3, 2026: member

    (my understanding is that the cert could also be revoked arbitrarily, along with normal expiration)

    Would be nice to check for that. The CRL URL is embedded in the cert.

    I think we should also add a similar check for macOS code-signing,

    The cert is not in the repo, so we cannot perform this check currently.

    given that is more prone to breakage (needs manual intervention multiple time a year to accept updated T&Cs). An automated check makes more sense in this case, because the breakage is somewhat arbitrary.

    It's not clear to me whether that breakage is occurring during signing or notarization. Either way, I don't think we can have any automated check for that, unless CI were to also have a code signing private key and a notarization API key, which I think is inadvisable.

  22. willcl-ark force-pushed on Nov 4, 2026
  23. willcl-ark renamed this:
    [DRAFT] ci: Monitor Windows signing certificate expiry
    contrib: ci: Monitor Windows signing certificate expiry
    on Nov 4, 2026
  24. willcl-ark commented at 9:28 AM on November 4, 2026: member

    Would be nice to check for that. The CRL URL is embedded in the cert.

    Added a light check for revocation.

    I am just a bit unsure if some random bash encoded in a string inside a yaml inside a mutable GHA VM inside some MS datacenter that requires a GHA write token to create an issue over the API is more reliable than the status quo.

    Moved this to a contrib script to it can be run manually (and in an automated CI job ;) )

  25. willcl-ark marked this as ready for review on Nov 4, 2026
  26. achow101 commented at 9:40 PM on November 4, 2026: member

    ACK 233e091ee426bd88e32cf0195fe26bebeb4573c6

  27. hebasto commented at 11:12 AM on November 7, 2026: member

    While testing in my fork, I got:

    Run status=0
      status=0
      ./contrib/devtools/check-code-signing-certificates.py > "$RUNNER_TEMP/certificate-report.txt" || status=$?
      cat "$RUNNER_TEMP/certificate-report.txt"
      if (( status == 1 )); then
        echo "warning=true" >> "$GITHUB_OUTPUT"
      else
        exit "$status"
      fi
      shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
      
    Revocation check failed for contrib/windeploy/win-codesign.cert:
    Unable to load CRL via CDP
    40D7DD81DB7F0000:error:1E800075:HTTP routines:check_set_resp_len:max resp len exceeded:../crypto/http/http_client.c:491:length=188339, max=102400
    40D7DD81DB7F0000:error:1E800067:HTTP routines:OSSL_HTTP_REQ_CTX_exchange:error receiving:../crypto/http/http_client.c:912:server=[http://crl3.digicert.com:80](http://crl3.digicert.com/)
    C = US, ST = Delaware, L = Lewes, O = Bitcoin Core Code Signing LLC, CN = Bitcoin Core Code Signing LLC
    error 3 at 0 depth lookup: unable to get certificate CRL
    error contrib/windeploy/win-codesign.cert: verification failed
    Error: Process completed with exit code 2.
    
  28. willcl-ark force-pushed on Nov 10, 2026
  29. willcl-ark commented at 11:25 AM on November 10, 2026: member

    While testing in my fork, I got:

    Thanks, reproduced with OpenSSL 3.0.13.

    Its CRL downloader has a 100 KiB limit, so I updated the script to download separately and pass the file to OpenSSL for verification which mitigates.

  30. ci: Monitor Windows signing certificate expiry and
    ...revocation.
    
    Check the signing certificate on master weekly so maintainers have time
    to renew it before Windows release signing is affected. Open an issue
    within 90 days of expiry, including certificate details and the checked
    commit.
    
    A signing certificate can also be revoked (before its expiry warning
    window). Fetch and validate its CRL so the weekly monitor can report
    confirmed revocation without treating network or verification failures
    as certificate replacement alerts.
    aceb05c436
  31. willcl-ark force-pushed on Nov 10, 2026
  32. in .github/workflows/code-signing-certificate.yml:55 in aceb05c436
      50 | +          export TITLE="Code signing certificate warning"
      51 | +          REPORT=$(cat "$RUNNER_TEMP/certificate-report.txt")
      52 | +          export REPORT
      53 | +          # Include closed issues so closing an alert acknowledges this report.
      54 | +          EXISTING=$(gh issue list --state all --search "\"$TITLE\" in:title" \
      55 | +            --json title,body,url --jq '.[] | select(.title == env.TITLE) | select(.body | contains(env.REPORT)) | .url')
    


    hebasto commented at 3:48 PM on November 16, 2026:

    The created issues must not be edited. Otherwise, they won't be recognized.

  33. hebasto approved
  34. hebasto commented at 3:48 PM on November 16, 2026: member

    ACK aceb05c436560763b6df6fe34d4ffdee17b89549.

  35. DrahtBot requested review from achow101 on Nov 16, 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-20 16:51 UTC

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