Skip to content

Rebuild standalone binaries with a maintained OpenSSL line #67

Closed

Description

@rmcdaniel

Finding

The current published CLI 2.3.1 standalone binaries do not have one consistent, maintained OpenSSL boundary.

Read-only inspection of the exact public assets on 2026-10-30 found:

  • every downloaded asset matches its public SHA256SUMS entry;
  • dw-linux-x86_64 and dw-linux-aarch64 are stripped, statically linked executables and both contain OpenSSL 3.6.2 plus libcurl/8.23.0;
  • dw-macos-aarch64 contains the same OpenSSL 3.6.2 and libcurl/8.23.0 identities;
  • dw-windows-x86_64.exe contains OpenSSL 3.6.5; the release source deliberately omits ext-curl on Windows and uses Symfony streams over OpenSSL;
  • the exact release workflow pins PHP 8.4.27 and static-php-cli 2.8.5 at revision 4318ef8fa32a02460ec1554746674a7bc42b49fa; the existing runtime guards prove PHP and extensions but do not assert the embedded OpenSSL/libcurl versions;
  • a current Composer 2.10.3 audit of the exact 2.3.1 lock reports zero advisories and zero abandoned packages.

OpenSSL 3.6.3, 3.6.4, and 3.6.5 are security patch releases after the embedded 3.6.2. The later fixes include high-severity CVE-2026-45447 and CVE-2026-84782 plus moderate and low findings. No CLI path was identified for the high-severity PKCS#7 or DTLS-specific defects, and no exploitation or customer impact was observed. The CLI does make outbound TLS connections, so the static TLS dependency remains a real runtime component rather than unused build inventory.

OpenSSL lists 3.6.5 as the final current 3.6 patch and the 3.6 line as supported only through 2026-11-01. OpenSSL 3.5 is the current LTS line through 2030. Primary references:

The generic Trivy filesystem scan reported zero language-specific inputs because it cannot inventory the embedded static PHP runtime. That zero is a scanner coverage limit, not a clean dependency result.

This is existing released-surface maintenance. It does not require an emergency rollback, does not block unrelated Server/Rust/SDK work, and requires no operator action, but the next CLI standalone release should not preserve this dependency state.

Required correction

  • Rebuild every standalone target with a supported OpenSSL line containing all applicable fixes, preferably OpenSSL 3.5 LTS at 3.5.9 or later. Do not publish another standalone release on OpenSSL 3.6 after its support end.
  • Keep Linux, Linux arm64, macOS, and Windows aligned on the selected supported policy unless a documented platform constraint requires a different supported version.
  • Preserve PHP 8.4.27 or a newer supported PHP patch, libcurl 8.23.0 or later where ext-curl is shipped, the pinned static-php-cli/toolchain checks, cache-identity binding, checksums, provenance, and immutable old assets.
  • Make the cache identity include the selected OpenSSL dependency policy so an older phpmicro cache cannot silently satisfy the new build.
  • Extend the produced-runtime evidence and release tests to fail closed on the exact embedded OpenSSL version and support floor on all four targets; retain the existing PHP and extension guards.
  • Publish through the normal protected release path. Verify every public binary, checksum, attestation, installer path, runtime version, OpenSSL identity, and normal outbound HTTPS behavior before closing.
  • Add a compact static-dependency inventory or SBOM sufficient for future advisory monitoring; do not treat a generic scanner zero as proof that embedded libraries are absent.

Preserve 2.3.1 unchanged for rollback and provenance verification; do not retag or replace its assets.

Current delivery

CLI 2.3.2 is published from a0bfe5967a6296de735eddca3a3ffbbfe3ed6817 through the normal successful release producer. #68 implements the supported dependency policy; #69 exercises actual native HTTPS before artifact handoff/publication.

All four native cold builds and trusted warm-cache release builds pass their runtime and HTTPS checks. All 14 public assets were downloaded; all 13 checksum entries and all four published runtime inventories pass. Each standalone target reports PHP 8.4.27 and OpenSSL 3.5.9 for loaded library and headers. Unix targets report libcurl 8.23.0 using that same OpenSSL backend; Windows retains streams.

All 14 exact-source/tag/workflow/hosted cryptographic attestation checks pass. Independent fresh no-PHP Linux installation, command discovery and normal public HTTPS upgrade metadata pass with current/target 2.3.2. Final acceptance receipt. Existing 2.3.1 remains unchanged.

Activity

  1. added
    kind:defectA public product behavior is incorrect
    priority:P1High-priority product or release risk
    status:readyReady for implementation
    on Oct 30, 2026
  2. rmcdaniel commented on Oct 30, 2026

    @rmcdaniel
    MemberAuthor

    Implementation-narrowing evidence: the exact 2.3.1 release uses static-php-cli 2.8.5, published April 18, at pinned revision 4318ef8f, and invokes spc download ... --prefer-pre-built. That SPC revision marks OpenSSL as provide-pre-built; its documented behavior is to prefer those precompiled library inputs. The resulting October cold-cache build and release binaries still contain OpenSSL 3.6.2 even though 3.6.5 had been available since September 29.

    The current phpmicro cache identity hashes the SPC version/revision, PHP version, extension list, runner/toolchain identities, prerequisite script, and release workflow, but not the resolved OpenSSL version/source digest. Merely expiring or rebuilding the cache with the same preference is therefore not a sufficient fail-closed correction.

    A robust implementation should select an exact supported OpenSSL source or verified prebuilt input, verify its official digest before build use, record the version+digest in retained evidence, and include that identity in the phpmicro cache key/manifest. Static-php-cli documents that config/source.json controls source resolution and may be overridden; an exact committed source policy is preferable to its dynamic latest-release selection for reproducible release builds. Keep 3.5.9+ LTS as the default target unless qualification proves a different supported line is required. This comment is implementation guidance, not a second gate or a source assignment.

  3. rmcdaniel commented on Oct 30, 2026

    @rmcdaniel
    MemberAuthor

    Implementation path is available without abandoning SPC's prebuilt cache for every library:

    • At pinned SPC revision 4318ef8, download --custom-url is processed before --prefer-pre-built. Supplying an exact openssl: URL therefore forces only OpenSSL to source while the other eligible libraries can remain prebuilt.
    • Pin OpenSSL 3.5.9 LTS. OpenSSL's current source page lists 3.5 through 8 April 2030 and 3.6 only through 1 November 2026. Its official checksum endpoint returns SHA-256 603f5602e2eef00d77fbd429d34dcd5822bb301757a1bc9cdb24c670f1eb859a for openssl-3.5.9.tar.gz.
    • SPC's own download lock records a SHA-1 of the fetched archive, not a caller-supplied expected digest. After spc download, resolve the openssl filename from downloads/.lock.json, require the exact expected basename, and compare its SHA-256 with the pinned official value before any build. Do this on Linux, macOS and Windows.
    • Include the OpenSSL version, expected SHA-256 and the download-policy/script digest in the phpmicro cache identity. A cache produced from 3.6.2/3.6.5 must not satisfy the new identity.
    • Require the produced runtime evidence to report exact OpenSSL 3.5.9, retain the existing extension/runtime probes, and verify the published binaries again. Other source/prebuilt identities remain unchanged.

    This avoids the short-lived 3.6 line and makes the actual library source/digest part of both build authority and cache provenance. Primary references: OpenSSL downloads/lifecycle and SPC DownloadCommand at the pinned revision.

  4. rmcdaniel commented on Oct 31, 2026

    @rmcdaniel
    MemberAuthor

    Source correction merged through #68 as 008eae24cc7cea8fba4e2df8b62bab5cf67e1724. All 16 reviewed-head checks pass, including PHP 8.2–8.5, reproducible PHAR, CodeQL and Sonar. The nine initial analyzer findings were corrected in code; current analysis reports zero new/accepted issues and zero hotspots, without changing gates or rules.

    The source policy pins OpenSSL 3.5.9 LTS at official SHA-256 603f5602e2eef00d77fbd429d34dcd5822bb301757a1bc9cdb24c670f1eb859a. A real, checksum-verified SPC 2.8.5 invocation with prebuilt preference fetched OpenSSL from that custom source URL, and the new guard accepted the actual archive and download lock. The produced-runtime guard checks the loaded OpenSSL library separately from headers, plus the Unix libcurl version/backend and Windows streams boundary. Per-target dependency inventories enter the normal required-asset/checksum/attestation path.

    Local validation: 38 Node release contracts pass, full PHP 921 tests / 17,396 assertions (11 existing deprecations, one skip), affected release contracts 15/384, parsed workflow YAML and actual library-probe output. The local probe validates extraction; it is not native micro-runtime qualification.

    The normal main-branch four-target cache warmer is running. No 2.3.2 tag or release is published. Next: qualify native cold/warm runtimes, then publish the ordinary patch and verify public assets, inventories, checksums, attestations, installers and outbound HTTPS. Keep #67 open through that installed acceptance; 2.3.1 stays immutable.

  5. rmcdaniel commented on Oct 31, 2026

    @rmcdaniel
    MemberAuthor

    Delivered CLI 2.3.2 from a0bfe5967a6296de735eddca3a3ffbbfe3ed6817; normal release producer passed and publication completed at 08:02:11 UTC on October 31.

    • #68 pins the official OpenSSL 3.5.9 source archive and includes policy/verifier hashes in native cache identity. #69 checks real outbound HTTPS on every native target before artifact handoff. Both source/main check sets pass; final Node contracts 39 pass, PHP 921 tests / 17,396 assertions pass with 11 existing deprecations and one skip. Sonar reports zero new issues or hotspots.
    • All four native targets passed cold compilation/runtime checks in 41178432254, the final-policy warmer, and trusted warm-cache runtime/HTTPS checks in the published producer. Loaded OpenSSL and headers are both 3.5.9, PHP is 8.4.27/micro, Unix libcurl is 8.23.0 with OpenSSL/3.5.9, and Windows retains its streams transport.
    • Downloaded all 14 public assets. All 13 SHA256SUMS entries match; all four public .dependencies.json inventories match that runtime policy. Cryptographic verification passes for all 14 assets including SHA256SUMS, requiring repository durable-workflow/cli, signer .github/workflows/release.yml, exact source digest a0bfe5967a6296de735eddca3a3ffbbfe3ed6817, refs/tags/2.3.2, and GitHub-hosted runners.
    • A separate fresh nonroot Linux consumer with no PHP and no source checkout downloads the public installer and binary, verifies checksums, reports installer status ready with installed/active version 2.3.2, lists commands, and completes normal upgrade --dry-run --output=json through public HTTPS with status: noop, current/target 2.3.2. An initial custom-directory test also confirmed the documented not-on-path diagnostic; adding that directory to PATH produces ready.

    OpenSSL lists the 3.5 LTS support line through April 8, 2030. This release provides a compact static runtime dependency inventory; generic language-scanner absence is not used as TLS evidence. Existing 2.3.1 tags/assets remain unchanged. No protocol or SDK change is needed.

    Acceptance completed 2026-10-31 08:20 UTC. Task-owned worktree, ignored caches, disposable consumer image, bulk downloads/tools and both verified merged remote heads have been removed. No task containers remain. Hosted producer logs and public checksummed/attested inventories remain the evidence.

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

    kind:defectA public product behavior is incorrectpriority:P1High-priority product or release riskstatus:readyReady for implementation

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions