From f73ec80f914c759042a48414055fa763134ad45e Mon Sep 17 00:00:00 2001 From: AlbertXXuu Date: Fri, 4 Sep 2026 19:15:43 +0800 Subject: [PATCH] fix: secure pip installation tooling without rewriting release evidence --- .github/workflows/ci.yml | 13 +++++++-- CHANGELOG.md | 8 ++++++ CONTRIBUTING.md | 1 + README.md | 3 ++ README.zh-CN.md | 2 ++ SECURITY.md | 28 ++++++++++++++++++- TASKS.md | 7 +++++ docs/alvenx-studio.md | 2 ++ docs/backends/qwen3-vl.md | 2 +- docs/backends/smolvlm2.md | 2 +- docs/guides/third-party-adapter.md | 1 + .../tutorials/first-reproducible-benchmark.md | 1 + tests/test_release_readiness.py | 22 +++++++++++++++ 13 files changed, 86 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 70bccaf..e9a6665 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -35,7 +35,9 @@ jobs: cache: pip cache-dependency-path: pyproject.toml - name: Install package - run: python -m pip install -e . + run: | + python -m pip install --upgrade "pip>=26.2" + python -m pip install -e . - name: Compile source and tests run: python -m compileall -q src tests - name: Check installed requirements @@ -73,10 +75,13 @@ jobs: - name: Validate runtime license audit policy run: python scripts/audit_runtime_licenses.py --validate-policy-only - name: Build wheel - run: python -m pip wheel . --no-deps --wheel-dir dist + run: | + python -m pip install --upgrade "pip>=26.2" + python -m pip wheel . --no-deps --wheel-dir dist - name: Install wheel in a fresh environment run: | python -m venv "$RUNNER_TEMP/wheel-venv" + "$RUNNER_TEMP/wheel-venv/bin/python" -m pip install --upgrade "pip>=26.2" "$RUNNER_TEMP/wheel-venv/bin/python" -m pip install --no-deps dist/*.whl "$RUNNER_TEMP/wheel-venv/bin/python" -m pip check - name: Smoke-test installed wheel outside checkout @@ -106,7 +111,9 @@ jobs: cache: pip cache-dependency-path: pyproject.toml - name: Install Studio extra - run: python -m pip install -e ".[studio]" + run: | + python -m pip install --upgrade "pip>=26.2" + python -m pip install -e ".[studio]" - name: Check Studio dependencies run: python -m pip check - name: Build and test Studio diff --git a/CHANGELOG.md b/CHANGELOG.md index c94db00..b2b0556 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,14 @@ All notable changes to this project will be documented in this file. +## Unreleased + +### Security + +- Require `pip>=26.2` before current package installations and in every CI + environment to address CVE-2026-13346. Preserve the immutable v1.0.0 package + inventory and verify that changes to its pip pin still fail the release gate. + ## [1.1.2] - 2026-08-31 ### Fixed diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 296f4cb..c7b2bc8 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -11,6 +11,7 @@ OpenMultimodalLab 已发布 `v1.0.0`。优先接受小型、可测试、能改 ```powershell python -m venv .venv .\.venv\Scripts\Activate.ps1 +python -m pip install --upgrade "pip>=26.2" python -m pip install -e . python scripts/contributor_smoke.py python -m unittest discover -s tests -v diff --git a/README.md b/README.md index 062d3e9..8e6e39b 100644 --- a/README.md +++ b/README.md @@ -157,6 +157,7 @@ git clone --branch v1.1.2 --depth 1 https://github.com/AlbertXXuu/OpenMultimodal cd OpenMultimodalLab py -3.11 -m venv .venv +.\.venv\Scripts\python.exe -m pip install --upgrade "pip>=26.2" .\.venv\Scripts\python.exe -m pip install -e . .\.venv\Scripts\oml.exe doctor @@ -172,6 +173,7 @@ Linux uses the same CLI arguments with POSIX environment paths: ```bash python3.11 -m venv .venv +.venv/bin/python -m pip install --upgrade "pip>=26.2" .venv/bin/python -m pip install -e . .venv/bin/oml doctor .venv/bin/oml run \ @@ -197,6 +199,7 @@ installs the interface, not the selected model backend or a CUDA-enabled PyTorch build. ```powershell +.\.venv-ml\Scripts\python.exe -m pip install --upgrade "pip>=26.2" .\.venv-ml\Scripts\python.exe -m pip install -e ".[studio]" .\.venv-ml\Scripts\oml.exe doctor --backend qwen3-vl .\.venv-ml\Scripts\oml.exe studio diff --git a/README.zh-CN.md b/README.zh-CN.md index 5495e4d..f78f35f 100644 --- a/README.zh-CN.md +++ b/README.zh-CN.md @@ -136,6 +136,7 @@ git clone --branch v1.1.2 --depth 1 https://github.com/AlbertXXuu/OpenMultimodal cd OpenMultimodalLab py -3.11 -m venv .venv +.\.venv\Scripts\python.exe -m pip install --upgrade "pip>=26.2" .\.venv\Scripts\python.exe -m pip install -e . .\.venv\Scripts\oml.exe doctor @@ -162,6 +163,7 @@ Reports 和项目介绍后置,同时严格区分试玩结果与正式评测证 界面,不会替你安装所选模型后端或支持 CUDA 的 PyTorch。 ```powershell +.\.venv-ml\Scripts\python.exe -m pip install --upgrade "pip>=26.2" .\.venv-ml\Scripts\python.exe -m pip install -e ".[studio]" .\.venv-ml\Scripts\oml.exe doctor --backend qwen3-vl .\.venv-ml\Scripts\oml.exe studio diff --git a/SECURITY.md b/SECURITY.md index d2519e6..62b53ce 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -2,10 +2,36 @@ ## Supported state -OpenMultimodalLab `v1.0.0` is the current stable release. Security fixes land +OpenMultimodalLab `v1.1.2` is the current maintained release; `v1.0.0` is the +immutable research/evidence baseline. Security fixes land on `main`; backports and a patch release are decided case by case from impact and compatibility. No long-term-support branch is promised. +## Installation tooling + +Before installing or updating the package in each environment, upgrade pip: + +```text +python -m pip install --upgrade "pip>=26.2" +python -m pip --version +``` + +pip versions below 26.2 are affected by +[CVE-2026-13346](https://github.com/advisories/GHSA-qwm4-qh6w-59xr), which requires +a malicious package index. Use a trusted index for the bootstrap as well as +subsequent installations. The supported installation guides and CI apply this +minimum separately to each environment, including newly created wheel-test venvs. + +The [Windows model constraints](requirements/model-windows-py311-constraints.txt) +record the packages present during the frozen v1.0.0 license audit. The old pip +entry is historical evidence, not a current installer requirement. Current +installation commands do not consume this file. Preserve it together with its +bound snapshot and report; see the [maintenance policy](docs/MAINTENANCE.md). +Do not use the historical file as a `pip install -r` installation list. A `-c` +constraint does not itself install packages, but its old pip pin conflicts with +the current pip minimum if pip is also requested. Record new environment audits +under new names rather than overwriting the released evidence. + ## Report a vulnerability Do not open a public issue containing an exploit, credential, private media, diff --git a/TASKS.md b/TASKS.md index 63736ec..3d0bba6 100644 --- a/TASKS.md +++ b/TASKS.md @@ -6,6 +6,13 @@ ## Now:发布后可靠性审查 +- [x] 针对 [Dependabot 安全告警 #1](https://github.com/AlbertXXuu/OpenMultimodalLab/security/dependabot/1) + 与 [PR #58](https://github.com/AlbertXXuu/OpenMultimodalLab/pull/58),为当前安装入口和 + CI 每个环境补齐 `pip>=26.2`。两个活动环境已升级至 `26.2.1`,其余包版本未变; + Windows 全新 editable/wheel 安装、13 项相关测试与 19 项发布门禁通过,203 项完整 + 测试通过(1 项既有 Windows 跳过)。冻结审计三份文件本轮逐字节未变,新增回归 + 继续拒绝历史 pip pin 漂移。远端 Linux CI 验收与告警处置记录在替代维护 PR 中。 + - [x] 明确 v1 冻结维护政策与一页式作品证据,不改写发布标签或哈希证据。 - [x] 从全新 `v1.0.0` 克隆审计公开 quick start,区分 Windows 正常路径、 严格离线构建工具缺口与 Ubuntu 系统 venv 前置条件。 diff --git a/docs/alvenx-studio.md b/docs/alvenx-studio.md index 5217049..853fd35 100644 --- a/docs/alvenx-studio.md +++ b/docs/alvenx-studio.md @@ -12,6 +12,7 @@ Use the Python 3.11 or 3.12 model environment documented for the selected backend. If that environment already works, add only the Studio extra: ```powershell +.\.venv-ml\Scripts\python.exe -m pip install --upgrade "pip>=26.2" .\.venv-ml\Scripts\python.exe -m pip install -e ".[studio]" .\.venv-ml\Scripts\oml.exe studio ``` @@ -20,6 +21,7 @@ For a new Qwen3-VL environment, install the backend and Studio together after installing the appropriate CUDA-enabled PyTorch build: ```powershell +.\.venv-ml\Scripts\python.exe -m pip install --upgrade "pip>=26.2" .\.venv-ml\Scripts\python.exe -m pip install -e ".[qwen3-vl,studio]" .\.venv-ml\Scripts\oml.exe doctor --backend qwen3-vl .\.venv-ml\Scripts\oml.exe studio diff --git a/docs/backends/qwen3-vl.md b/docs/backends/qwen3-vl.md index 3c3abf7..782ea7b 100644 --- a/docs/backends/qwen3-vl.md +++ b/docs/backends/qwen3-vl.md @@ -34,7 +34,7 @@ The following configuration was selected for the initial Windows experiment: ```powershell py -3.11 -m venv .venv-ml -.\.venv-ml\Scripts\python.exe -m pip install --upgrade pip +.\.venv-ml\Scripts\python.exe -m pip install --upgrade "pip>=26.2" .\.venv-ml\Scripts\python.exe -m pip install ` torch==2.13.0 ` torchvision==0.28.0 ` diff --git a/docs/backends/smolvlm2.md b/docs/backends/smolvlm2.md index 1222850..0c77a8f 100644 --- a/docs/backends/smolvlm2.md +++ b/docs/backends/smolvlm2.md @@ -45,7 +45,7 @@ Use a separate Python 3.11 or 3.12 environment for real models: ```powershell py -3.11 -m venv .venv-ml -.\.venv-ml\Scripts\python.exe -m pip install --upgrade pip +.\.venv-ml\Scripts\python.exe -m pip install --upgrade "pip>=26.2" .\.venv-ml\Scripts\python.exe -m pip install -e ".[smolvlm2]" .\.venv-ml\Scripts\oml.exe doctor --backend smolvlm2 ``` diff --git a/docs/guides/third-party-adapter.md b/docs/guides/third-party-adapter.md index 8be69fb..d94bfb0 100644 --- a/docs/guides/third-party-adapter.md +++ b/docs/guides/third-party-adapter.md @@ -13,6 +13,7 @@ core package: ```powershell python -m venv .venv +.\.venv\Scripts\python.exe -m pip install --upgrade "pip>=26.2" .\.venv\Scripts\python.exe -m pip install -e . .\.venv\Scripts\python.exe -m examples.custom_adapter.run_example .\.venv\Scripts\python.exe -m unittest examples.custom_adapter.test_contract -v diff --git a/docs/tutorials/first-reproducible-benchmark.md b/docs/tutorials/first-reproducible-benchmark.md index deff592..e01a0ff 100644 --- a/docs/tutorials/first-reproducible-benchmark.md +++ b/docs/tutorials/first-reproducible-benchmark.md @@ -26,6 +26,7 @@ Create an isolated environment: ```powershell py -3.11 -m venv .venv +.\.venv\Scripts\python.exe -m pip install --upgrade "pip>=26.2" .\.venv\Scripts\python.exe -m pip install -e . ``` diff --git a/tests/test_release_readiness.py b/tests/test_release_readiness.py index b3f1d65..5ab0933 100644 --- a/tests/test_release_readiness.py +++ b/tests/test_release_readiness.py @@ -174,6 +174,28 @@ def test_license_snapshot_requires_integrity_and_clean_evidence(self) -> None: self.assertIn("hash_match=True", detail) self.assertFalse(tampered) + def test_constraints_reject_pip_upgrade_without_matching_snapshot(self) -> None: + baseline = ( + PROJECT_ROOT / "requirements/model-windows-py311-constraints.txt" + ) + snapshot = ( + PROJECT_ROOT / "docs/reports/results/final-runtime-license-audit.json" + ) + original = baseline.read_bytes() + self.assertEqual(original.count(b"pip==26.1.2"), 1) + baseline_passed, _ = _constraints_status(baseline, snapshot) + self.assertTrue(baseline_passed) + + with tempfile.TemporaryDirectory() as temp_dir: + constraints = Path(temp_dir) / "constraints.txt" + constraints.write_bytes( + original.replace(b"pip==26.1.2", b"pip==26.2") + ) + passed, detail = _constraints_status(constraints, snapshot) + + self.assertFalse(passed) + self.assertIn("match_snapshot=False", detail) + def test_current_readiness_reports_proven_gates_and_real_blockers(self) -> None: checks = { check.id: check