fix(pii): bump transformers to 5.5.0 for LightGlue RCE advisory#5662
fix(pii): bump transformers to 5.5.0 for LightGlue RCE advisory#5662waleedlatif1 wants to merge 3 commits into
Conversation
transformers <5.5.0 is vulnerable to arbitrary code execution during model initialization in the LightGlue loading path (Dependabot alerts #174/#175). huggingface_hub moves 1.3.0 -> 1.23.0 because transformers 5.5.0 requires huggingface-hub>=1.5.0. Verified the full pin set (torch 2.11.0, gliner 0.2.27, presidio 2.2.362, spacy 3.8.14) resolves with pip; gliner 0.2.27 allows transformers <5.7.0 and any hub >=0.21.4.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
PR SummaryLow Risk Overview Docker build hardening in Reviewed by Cursor Bugbot for commit 6dd8465. Configure here. |
Greptile SummaryThis PR updates the PII GLiNER image dependencies and adds a build-time inference check.
Confidence Score: 5/5This looks safe to merge.
Important Files Changed
Reviews (3): Last reviewed commit: "improvement(pii): require date detection..." | Re-trigger Greptile |
The bake step previously only proved GLiNER.from_pretrained loads — a transformers/gliner bump that silently stops returning detections would still build and pass /health. The bake step now runs predict_entities on a sample sentence (labels from engines.py's GLINER_ENTITY_MAPPING) and fails the build unless person + location are detected. Verified against the exact bumped pin set (transformers 5.5.0, huggingface_hub 1.23.0, gliner 0.2.27, torch 2.11.0): person 0.9999, location 0.9951, date 0.9987.
|
@cursor review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit e6884fa. Configure here.
…sert The smoke input already requests the date label; asserting it closes the gap where DATE_TIME detection could silently regress while person and location still pass. Verified locally against the bumped pin set: all three labels detected.
|
@cursor review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 6dd8465. Configure here.
Summary
transformers5.3.0 → 5.5.0 inapps/pii/requirements-gliner.txt— first patched version for the LightGlue arbitrary-code-execution advisory (Dependabot alerts fix(deps): bump @cerebras/cerebras_cloud_sdk from 1.25.0 to 1.26.0 in /sim #174/[REQUEST] Improve webhook model UX #175, High)huggingface_hub1.3.0 → 1.23.0 — required: transformers 5.5.0 declareshuggingface-hub>=1.5.0,<2.0, so bumping transformers alone (as Dependabot's chore(deps): bump transformers from 5.3.0 to 5.5.0 in /apps/pii in the pip group across 1 directory #5645 does) fails pip resolution during the gliner image buildrequirements.txtis a dependency-graph artifact (that file has never pinned transformers) and clears once the default branch re-scansType of Change
Testing
pip install --dry-runin a clean venv — tokenizers resolves to 0.22.2 within transformers'>=0.22.0,<=0.23.0rangetransformers>=4.51.3,<5.7.0andhuggingface_hub>=0.21.4; Dockerfiletorch==2.11.0satisfies transformers'torch>=2.4Checklist