docs(security): protobuf 上界改为实测结论(无人挡住)+ 锁集全量审计数字 - #105
Merged
Merged
Conversation
§3a 前两版的说法都不成立。实测方法:读 requirements-lock.txt 的 95 个钉版包,逐个取 PyPI 元数据筛 requires_dist —— 95 个全部查询成功,提到 protobuf 的共 13 行,**13 行全部带 `extra ==` 门控**(modelscope 的 `protobuf<3.21.0,>=3.19.0` 只挂在 nlp/all 上,而我们 `requirements.txt:8` 是 `modelscope>=1.9.0`、一个 extra 都没请求;transformers 与 sentencepiece 同样只在 extra 里提 protobuf)。所以 `protobuf==3.19.6` 不是被钉住的,是这份 锁当年编译留下的历史值;funasr==1.4.15 的元数据根本不提 protobuf。 于是 #90(→7.36.1)在元数据层面完全可解,且不必跳那么大:4.25.8 关 P1、5.29.6 关 P2。 不合的理由改成实话——剩下的是运行时风险(旧 `_pb2.py` 撞新运行时的 `Descriptors cannot be created directly`),只有真装 + 真加载模型才走得到,而 CI 那 12 个 CPU 矩阵覆盖不到;本仓 app/ 对 google.protobuf / _pb2 是零直接引用。 §1 的 P1/P2 两行补上 PYSEC/GHSA 号与两条并行修复线(OSV 明细),§4 复点条件 2 同步。 新增 §7: - 7a 全锁审计(OSV querybatch,一次问完 95 个包):**只有 2 个包有公告** —— transformers 4.52.1 计 24 条记录 = 16 个去重公告,protobuf 3.19.6 计 4 条 = 2 个公告, 其余 93 个包 0 公告。附可复现脚本。 - 7b 复算 + 真装验收的命令清单(新建 .venv-relock,不动现有 .venv 与 model/), 含三个必须在复算里回答的问题与三引擎基线数字。GB 级传输那一步按本仓规矩留给所有者。 Signed-off-by: ReSerendipity <zengyangc@outlook.com>
上一版这里写着"`dismissed_reason` 我该现查而不是照记忆写",现在查了,两个独立来源一致:
- REST 文档:state ∈ dismissed/open;dismissed_reason ∈ fix_started / inaccurate /
no_bandwidth / not_used / tolerable_risk;注释字段是 dismissed_comment(没有 comment)。
- GraphQL 内省(不依赖文档时效):`__type(name:"DismissReason")` = ENUM
{FIX_STARTED, NO_BANDWIDTH, TOLERABLE_RISK, INACCURATE, NOT_USED}。
告警号 ↔ §1 行不再凭印象:`GET /dependabot/alerts?state=open` 实取 20 条,逐号对齐
(3/13=CVE-2025-4565、4/14=5197、5/15=6638、6/16=6051、7/17=6921、8/18=0994、9/19=1839、
10/20=4372、11/21=5241、12/22=9856,每个号在 launcher/requirements-small.txt 与
requirements-lock.txt 各一条),并顺带证实 **A9–A16 那 8 条确实不在告警列表里**
(没有 GHSA 记录,Dependabot 不开单)—— 所以"告警清零"不能当验收口径。
给了逐条建议的 dismissed_reason(代码路径不存在的用 not_used,需要攻击者喂模型文件/
本机自用前提成立的用 tolerable_risk)+ 单条试跑命令。写操作本身仍留给所有者。
Signed-off-by: ReSerendipity <zengyangc@outlook.com>
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.
纯文档 PR(只改
docs/SECURITY_DEPENDABOT_TRIAGE.md),但改的是结论,所以带完整判据。更正了什么
分诊文档 §3a 关于 protobuf 的"被谁挡住",前两个版本都不成立:
descript-audiotools<3.20/modelscope<3.21挡住pip-compile复算方法(不需要下载包,只请求元数据):读
requirements-lock.txt的 95 个钉版,逐个/pypi/<name>/<ver>/json筛requires_dist。95 个全部查询成功,提到 protobuf 的 13 行全部带
extra ==门控:modelscope==1.40.1:protobuf<3.21.0,>=3.19.0只挂在nlp/all,protobuf(无界)挂在audio/audio-tts—— 而requirements.txt:8是modelscope>=1.9.0,一个 extra 都没请求;transformers==4.52.1:7 处提到 protobuf,全在all/dev*/torchhub等 extra 里;sentencepiece==0.2.2:2 处,全在protobuf/testextra 里;funasr==1.4.15:元数据里根本不提 protobuf。结论:
protobuf==3.19.6不是被钉住的,是这份锁当年编译留下的历史值。#90(→ 7.36.1)在元数据层面可解,且其实不必跳那么大 ——
4.25.8关 P1、5.29.6关 P2(同一公告另有6.31.1 / 6.33.5 两条并行修复线)。
为什么仍然不合 #90
风险不在元数据里,在运行时:protobuf 跨大版本最常坏在 gencode 与运行时不匹配
(旧
_pb2.py在新运行时 import 期即报Descriptors cannot be created directly),而这条只有真装环境 + 真加载模型才走得到。本仓
app/对google.protobuf/_pb2零直接引用,CI 上跑绿的 12 个 pytest 矩阵是无 GPU 的 CPU 环境 —— 绿不构成证据。所以处置改成
"排在复算 + 真机复验之后批量抬",并把命令写清(§7b),GB 级传输留给所有者跑。
新增 §7
querybatch,95 个包一次问完):只有 2 个包有公告 ——transformers==4.52.124 条记录 = 16 个去重公告(§1 A1–A16)、protobuf==3.19.64 条记录 = 2 个公告(P1/P2),其余 93 个包 0 公告。整份锁的已知漏洞面集中在这两个包上,
且都已登记完。附可复现脚本。
.venv-relock,不动现有.venv与model/),含三个必须在复算里回答的问题、以及三引擎的真机基线数字(214,040 B / RMS 6176 等)。
验证
本机:
pytest tests/test_dependency_consistency.py11 passed(§1 表被 D4 解析,改行没破坏"豁免集合 == 表集合"这条断言)、
check_spec_refs.pynew=0、ruff check/format --check全绿。工作树只含这一个文件(临时脚本已删)。