Repository navigation
Keep transformers sidecar pins out of child argv (macOS XProtect blocks the installer) - #18883
Closed
shimmyshimmer wants to merge 1 commit into
Closed
shimmyshimmer wants to merge 1 commit into
shimmyshimmer wants to merge 1 commit into
Conversation
macOS XProtect checks the argv of a pasted curl | sh install with Safe Browsing. It reads transformers==5.13.1 as the IPv4 address 5.13.0.1, http://5.13.0.1/ is listed, and the whole Terminal session is killed with the scripted-malware prompt, followed by paste blocking (#18699). setup.sh now sends sidecar pins to install_manifest.py on stdin and to uv/pip through a requirements file; the runtime sidecar repair in transformers_version.py does the same.
danielhanchen
added a commit
that referenced
this pull request
Nov 22, 2026
…macOS XProtect block) (#18888) ## Move the highest transformers sidecar from 5.13.1 to 5.15.1 Related: #18699, #18883. ### Why On macOS 26/27, XProtect checks the command line of processes started from a pasted `curl ... | sh` install against Google Safe Browsing. It reads a dotted version the way `inet_aton` does, so `transformers==5.13.1` becomes `http://5.13.0.1/`. Google Safe Browsing currently lists that URL as phishing (a fresh VirusTotal scan today returns `Google Safe Browsing: phishing`; its stored 2016 record was clean). The block id `url-3a20768066824ab0...` in the macOS log is the SHA-256 of `http://5.13.0.1/`. #18883 keeps the sidecar pins off argv. This PR also moves the pin itself, so the version string no longer appears in any process, log line or doc snippet that a user might paste. ### Why 5.15.1 | Version | tokenizers window | `import transformers` next to tokenizers 0.22.2 | `gemma4_unified`, `gemma4_assistant`, `gemma4_unified_assistant` | |---|---|---|---| | 5.13.1 (current) | `>=0.22.0,<=0.23.0` | OK | yes | | 5.14.1 | `>=0.22.0,<=0.23.0` | OK | yes | | **5.15.1** | `>=0.22.0,<=0.23.0` | **OK** | **yes** | | 5.16.1 | `>=0.23.1,<0.24.0` | fails: `tokenizers>=0.23.1,<0.24.0 is required ... but found tokenizers==0.22.2` | n/a | The sidecar is installed `--no-deps` and imports the main env's tokenizers (pinned `<=0.23.0`), so 5.15.1 is the newest release that is a drop-in. 5.16 and later would need their own tokenizers in the sidecar. The IP forms of all three sidecar pins after this change (`5.15.0.1`, `5.5.0.4`, `5.3.0.0`) came back clean from a fresh Google Safe Browsing scan via VirusTotal. ### Change - `studio/setup.sh`, `studio/setup.ps1`: `.venv_t5_510` audit, offline-defer loops, install call and step labels use 5.15.1. - `studio/backend/utils/transformers_version.py`: `TRANSFORMERS_510_VERSION = "5.15.1"`; the runtime repair reads its package list from it. - `studio/backend/requirements/studio.txt`: comment only (5.15.1 also requires `safetensors>=0.8.0`). - Tests: tokenizers-window table keyed on 5.15.1; kernels sidecar-scan fixtures; the custom-code routing tests now pin the tier version where a case depends on it being below the fake main release. ### Existing installs update automatically - `unsloth studio update` or rerunning the install command: `_sidecar_current` / `Test-SidecarCurrent` see 5.13.1 where 5.15.1 is required, then wipe and rebuild `.venv_t5_510`. - Without an update: the first load of a 510-tier model (Gemma 4 Unified / 12B, custom code saved by 5.11 to 5.15) runs `_ensure_venv_t5_510_exists`, which compares the installed `Version:` with `TRANSFORMERS_510_VERSION` and rebuilds on a mismatch. - Offline (`UV_OFFLINE`): deferred to the next online update, as for every sidecar. ### Verification - `studio/backend/tests/test_transformers_latest.py`, `studio/backend/tests/test_kernels_compat.py`, `tests/studio/install/test_transformers_tokenizers_pair.py`: 169 passed, 1 skipped. - Wider set (transformers_version, tiktoken, tokenizers/torch constraint, fast-path guard, update idempotency, manifest pass evidence, cap sites) on this change: 752 passed, 13 skipped. The one failure, `test_main_offered_when_pypi_is_behind`, relied on the old pin being below its fake 5.14 main release and is fixed here. - `bash -n studio/setup.sh` clean; pre-commit ruff clean. ### Not covered - No Gemma 4 Unified model was loaded or trained on 5.15.1; checked by import and config mapping only, as #17589 did for 5.13.1. - Not yet re-run as a copied-from-browser install on a Mac.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix the macOS "script was blocked because it contains malware" prompt during install/update
Fixes #18699.
On macOS 26, running
curl -fsSL https://unsloth.ai/install.sh | shfrom a command copied out of a browser could end at the transformers sidecar step with "A script was blocked because it contains malware". The Terminal tab was killed, and pasting the command again was refused ("Malware Detected, Paste Blocked").Cause
When a pasted download-and-run command is executing, XProtect checks the command line of every process it starts against Google Safe Browsing.
setup.shchecked and installed the 5.13 sidecar withtransformers==5.13.1as a command-line argument. XProtect reads5.13.1as the IPv4 address5.13.0.1, andhttp://5.13.0.1/is on the Safe Browsing malware list. The other sidecar pins (5.3.0,5.5.4,huggingface_hub==1.8.0,hf_xet==1.4.2) pass.Reproduced on macOS 26.6.2 (XProtect 5377) with private log data enabled:
/usr/bin/true transformers==5.13.1is blocked. The same command with the other pins passes.url-3a20768066824ab0..., which is the SHA-256 ofhttp://5.13.0.1/.esloggerexec trace of a real update shows the threeinstall_manifest.py sidecar ...audits at the point where the earlier runs were killed, with the same gaps between execs. The 5.13 audit is the third one, which is the one that was killed.Change
studio/setup.sh:_sidecar_currentpipes the pins toinstall_manifest.py sidecar <dir> -on stdin. The new_sidecar_install_pinwrites each pin to a temporaryrequirements.txtand installs it with-r, for both uv and pip.studio/install_manifest.py:sidecar <dir> -reads the pins from stdin. Pins passed as arguments still work.studio/backend/utils/transformers_version.py: the runtime sidecar repair (_install_to_dir) also passes the requirement in a file. A Studio launched from a monitored Terminal would otherwise hit the same block.Nothing changes for users: the same packages are installed into the same directories, and the printed step labels are unchanged.
Verification
tests/studio/install/test_sidecar_pins_off_argv.py(install and audit argv carry no pins, stdin and argv give the same shim answer) andstudio/backend/tests/test_sidecar_install_pin_off_argv.py(uv and pip get the pin from a file that is removed afterwards).tests/studio/install/test_install_manifest_pass_evidence.py,test_setup_fast_path_guard.py,tests/python/test_tokenizers_and_torch_constraint.py: 193 passed. The sidecar install count assertion is updated from 4 to 3 directfast_install_sidecarcalls, plus 2_sidecar_install_pincalls.studio/backend/tests/test_transformers_version_optional_tiktoken.py: passes.sidecar: currenton real 5.3.0 / 5.5.4 / 5.13.1 sidecars, the same answer as the argv form.uv pip install --target ... --no-deps --upgrade -r requirements.txtand the equivalentpipcommand install into the target.mainon this host: 8 tier tests intest_transformers_version.py(no transformers in the test venv) and 1 case intests/sh/test_mirror_fallback.sh.Not covered here
setup.ps1is unchanged: XProtect is macOS-only.transformers==5.13.1will still be paste-blocked when copied from a browser on macOS 26.