Skip to content

fix(deps): cap cryptography below 49 on Intel Macs - #5546

Merged
kovtcharov-amd merged 3 commits into
mainfrom
fix/cryptography-intel-mac
Oct 21, 2026
Merged

kovtcharov-amd merged 3 commits into
mainfrom
fix/cryptography-intel-mac

Conversation

@kovtcharov-amd

@kovtcharov-amd kovtcharov-amd commented Oct 21, 2026 •

Copy link
Copy Markdown
Collaborator

Intel Mac users couldn't run install.sh or pip install amd-gaia. cryptography 49 and later publish macOS wheels for arm64 only, so an x86_64 Mac fell back to the source package, and building that needs a Rust compiler. Intel Macs now stay on 48.0.1, the last release with a universal2 wheel. Every other platform keeps the latest cryptography, because 49 and 50 fix three published advisories that a global cap would bring back.

Closes #5529

Test plan

  • uv pip compile setup.py for core and every extra, py3.12, --only-binary cryptography: darwin-x64 resolves 48.0.1, while darwin-arm64, linux-x64 and win-x64 resolve 50.0.2. The default (sdist-allowed) resolution picks the same versions.
  • --only-binary=:all: for [api], [ui] and the freeze set [api,rag,diarize,browser] resolves on all four platforms
  • pytest tests/unit/test_dependency_major_caps.py tests/unit/agents/test_install_hints.py
  • python util/lint.py --black --isort --flake8
  • Dependency Review passes. The Intel-Mac-only range carries GHSA-jwv3-5hgf-82ww, which is allowed in dependency-review.yml.
  • build_flagship_sidecar.yml dispatched on this branch (run 39674578730): all four freezes pass, and darwin-x64 installs the 48.0.1 wheel
  • Headless mac-x64-install-sh (run 39674590498, v0.25.1-rc2) still reports known install.sh fails on Intel Macs: a dependency has no Intel macOS build and needs a Rust compiler #5529, since it installs the published, uncapped 0.25.1rc2 from PyPI. The known-failure entry stays until the next RC clears it.
🔍 Technical details
  • Two install_requires entries, split by sys_platform == 'darwin' and platform_machine == 'x86_64'. Extras can't carry markers, but core requirements can: gaia_extra_requirements skips any line without extra in its marker, and pywin32 already has one.
  • OSV advisories that a global <49 would reintroduce: GHSA-jwv3-5hgf-82ww and GHSA-m2h6-j472-rp4c (fixed in 49), GHSA-g6cj-pr64-35w5 (fixed in 50). Intel Macs carry them until a fix ships an x86_64 wheel, which beats not installing at all. Only the first is rated high, so it's the only one Dependency Review needed allowed.
  • Before this change, the darwin-x64 sidecar freeze built 50.0.2 from source against Homebrew's dynamically linked OpenSSL. The runner has Rust, so it passed. With the cap it takes the static-OpenSSL wheel instead.

Intel Mac installs failed: cryptography 49 and later publish macOS wheels
for arm64 only, so install.sh and `pip install amd-gaia` on an x86_64 Mac
fell back to the source package, which needs a Rust toolchain. 48.0.1 is
the last release with a universal2 wheel.

The cap is global, like pymupdf's (#5481), so every platform and every
frozen build resolves the same wheel. The skill-signing install hint now
names the same range.

Closes #5529
Intel Mac installs failed, but a global cap would have put every other
platform back on 48.0.1, which three published advisories (fixed in 49 and
50) affect. The cap now applies only to macOS x86_64; arm64 Macs, Linux and
Windows keep resolving the latest wheel. A marker is fine here because this
is a core requirement: `gaia init` only parses the extras' markers.
@github-actions github-actions Bot added dependencies Dependency updates tests Test changes labels Oct 21, 2026
@github-actions

Copy link
Copy Markdown
Contributor

⚠️ Deprecation Warning: The deny-licenses option is deprecated for possible removal in the next major release. For more information, see issue 997.

Dependency Review

The following issues were found:
  • ❌ 1 vulnerable package(s)
  • ✅ 0 package(s) with incompatible licenses
  • ✅ 0 package(s) with invalid SPDX license definitions
  • ✅ 0 package(s) with unknown licenses.
See the Details below.

Vulnerabilities

setup.py

NameVersionVulnerabilitySeverity
cryptography>= 42.0.0,< 49python-cryptography: Duplicate self-signed intermediates can cause exponential path-buildinghigh
Only included vulnerabilities with severity high or higher.

OpenSSF Scorecard

PackageVersionScoreDetails
pip/cryptography >= 42.0.0,< 49 UnknownUnknown

Scanned Files

  • setup.py

@github-actions

Copy link
Copy Markdown
Contributor

Verdict: Approve

Intel Mac users can install GAIA again: those Macs stay on cryptography 48.0.1, the last release with a wheel they can use, and every other platform keeps the latest version with its security fixes. The two platform conditions cover every case without overlap, and the existing install-hint parser already skips core requirements that carry a platform condition, so gaia init is unaffected.

The only open item is the one the test plan already names: dispatch the flagship sidecar build on this branch to confirm the Intel Mac freeze picks up the 48.0.1 wheel.

Real-world evidence

N/A: this PR only changes packaging and a static test, and the CI evidence stage produced no bundle. The verdict rests on static review plus the author's uv pip compile resolutions across four platforms in the test plan. The darwin-x64 sidecar freeze is still unchecked.

🔍 Technical details

Issues found: none blocking.

Checks made

  • setup.py:169-170: the two markers are exact complements (!= darwin or != x86_64 vs == darwin and == x86_64), so exactly one entry applies on any host. That includes an x86_64 Python under Rosetta on Apple Silicon, which also needs the cap.
  • src/gaia/agents/install_hints.py:252-253 skips any requirement whose marker lacks extra, so the new markers can't trip gaia init's extras parsing. The PR body says the same.
  • Nothing else in the repo (freeze specs, requirement files, workflows) pins cryptography, so the cap has no second copy to drift from.

Strengths

  • The test parametrizes over four platforms and checks both properties for each: exactly one requirement applies, and only darwin-x64 is capped. A later edit that drops the marker, or caps globally and brings the GHSA advisories back, fails it.
  • Scoping the cap to one platform instead of capping globally keeps the 49/50 security fixes everywhere a wheel exists.

…ac cap

Dependency Review failed on the Intel-Mac-only cryptography entry. That
range is the only one with an x86_64 macOS wheel, so the advisory can't be
avoided there; every other platform stays on the fixed releases.
@github-actions github-actions Bot added the devops DevOps/infrastructure changes label Oct 21, 2026
@kovtcharov-amd
kovtcharov-amd added this pull request to the merge queue Oct 21, 2026
Merged via the queue into main with commit 72c4421 Oct 21, 2026
74 of 77 checks passed
@kovtcharov-amd
kovtcharov-amd deleted the fix/cryptography-intel-mac branch October 21, 2026 22:06
kovtcharov-amd pushed a commit that referenced this pull request Oct 23, 2026
…5606)

The installer journeys now fail every PR that runs them, with "known bug
#5526 no longer reproduces" (ubuntu22 install-sh and tui-deb) and "known
bug #5529 no longer reproduces" (mac-x64 install-sh). Both bugs are
fixed — #5526 is closed and #5529 was fixed by #5546 — but their entries
in `known_failures.json` still expect the old failure. This removes
those two entries, as the file's own instructions ask.

## Test plan
- [x] `pytest tests/unit/installer/test_installer_headless.py` passes.
- [ ] The installer journeys go green on this PR (they failed on #5597
and #5601 with the messages above).

Co-authored-by: Kalin Ovtcharov <[email protected]>
kovtcharov-amd added a commit to kovtcharov/gaia that referenced this pull request Oct 24, 2026
…5625)

The v0.25.1 notes stopped at the release PR (amd#5474). That left fixes
that users will notice out of the notes, and the changelog stopped short
of the release commit. This PR adds those three fixes: the GAIA agent
starts on Ubuntu 22.04, Debian 12 and RHEL 9 (amd#5545); Intel Macs can
install again (amd#5546, amd#5481); and Windows settings folders you can read
but can't create files in now load (amd#5469). It also adds six fixes from
rc6 and rc7 and regenerates the changelog from git against rc7.

## Test plan
- [x] `python util/validate_release_notes.py docs/releases/v0.25.1.mdx
--tag v0.25.1`
- [x] `pytest tests/unit/test_docs_json_release.py`
- [x] `mintlify validate` from `docs/`
- [x] The changelog lists 213 commits, the same count as `git rev-list
--count v0.25.0..v0.25.1-rc7`. The narrative stays within the 350-word
patch cap.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Dependency updates devops DevOps/infrastructure changes tests Test changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

install.sh fails on Intel Macs: a dependency has no Intel macOS build and needs a Rust compiler

1 participant