Pin Hugging Face commit revisions for AuK weight downloads and eliminate post-download SHA TOCTOU
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 62/100
Hướng nghiên cứu
Bắt đầu từ server/services/voice/aukRuntime.js: AUK_WEIGHT_SOURCES quanh các dòng 21-24 cần một revision hex 40 ký tự cho mỗi repo, còn lệnh gọi Python snapshot_download quanh các dòng 81-87 cần nhận giá trị đó qua sys.argv[3]. Sau đó xóa lần tra cứu thứ hai HfApi().model_info(repo).sha và ghi revision đã ghim vào portos-source.json. Cập nhật server/services/voice/aukRuntime.test.js để kiểm tra rằng mọi lần tải xuống đều truyền một revision hex 40 ký tự và ghi nhận cùng giá trị đó. Hoàn thành khi các test đều đạt và không còn lệnh gọi model_info nào.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Problem
server/services/voice/aukRuntime.js pins the AuK git checkout (AUK_REVISION at line 18), private uv, and hash-locked Python packages (auk-mlx at line 76), but AUK_WEIGHT_SOURCES (aukRuntime.js:21-24) omits commit revision pins for tencent/AuK-Flash and Qwen/Qwen2.5-Omni-3B. At lines 81-87 it runs snapshot_download(repo_id=repo, local_dir=str(dest)) against floating main, then makes a separate post-download HfApi().model_info(repo).sha call to stamp portos-source.json (TOCTOU mismatch risk).
Impact
New AuK setups pull unreviewed floating main model files from two external Hugging Face repositories directly into auk_mlx.convert despite locking the git repo and Python closure, and the post-download model_info call can record a different SHA than the snapshot actually downloaded.
Decided Fix
Add an immutable 40-char hex revision field to each entry in AUK_WEIGHT_SOURCES (server/services/voice/aukRuntime.js:21-24), pass it as sys.argv[3] into snapshot_download(repo_id=repo, revision=rev, local_dir=str(dest)) (aukRuntime.js:81-87), and write that exact rev directly into portos-source.json instead of making a second post-download HfApi().model_info(repo).sha query. Update server/services/voice/aukRuntime.test.js to verify the pinned revision argument.
Affected Files
server/services/voice/aukRuntime.jsserver/services/voice/aukRuntime.test.js
Acceptance Criteria
- Each entry in AUK_WEIGHT_SOURCES in server/services/voice/aukRuntime.js declares an immutable 40-char hex Hugging Face commit SHA (revision).
- startAukSetup passes revision=sys.argv[3] directly to snapshot_download(repo_id=repo, revision=rev, local_dir=str(dest)) and writes that exact pinned revision to portos-source.json without a second post-download HfApi().model_info(repo) network call.
- server/services/voice/aukRuntime.test.js asserts that every AuK weight download passes a 40-char hex revision to snapshot_download and records that same revision.
Origin: PortOS better-dependency-freedom baseline audit (2026-11-24) · Severity: 6/10
- Ngôn ngữ chính
- JavaScript
- Star
- 38
- Fork
- 32
- Merge trung bình
- 20 phút
- Pull request đã merge (30 ngày)
- 996
Chuẩn bị môi trường
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của atomantic/PortOS
-
area:media bug effort:low in-progress model:light plan planner:gemini-4-neon-high reliability-error-handling
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
Maintainer thường phản hồi trong vòng 1 ngày
-
area:create bug effort:low feature-completeness in-progress model:light plan planner:gemini-4-neon-high
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
api-contract area:cos-agents effort:low in-progress model:light plan planner:gemini-4-neon-high
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Include standard error/code/timestamp fields on 409 responses from /api/docker-containment routesĐang mởapi-contract area:devtools effort:low in-progress model:light plan planner:gemini-4-neon-high
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
area:calendar area:ui design-usability effort:low in-progress model:light plan planner:gemini-4-neon-high priority:2 ux
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của atomantic/PortOS
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 80/100
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 80/100
cloudflare/workers-sdk#17139 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area: editor P3 type: feature
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
halisonworks/mod-codeling#290 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Teams conversion crashes on channel messages sent by an applicationCó thể đã có người làm @sdivyanshu90 đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 2 ngày