fix(platform_measurement): reject non-string or empty runtime.measurement across Python and TypeScript
Maintainer thường phản hồi trong vòng 1 ngày
Một pull request liên quan đã được merge.
- #633 của @drk-ram — đã merge
Đá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
- 30/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- python, typescript
- Lĩnh vực
- backend-api-design
Hướng nghiên cứu
Read src/agentrust_trace/platform_measurement.py and trust-record-verify/src/platform.ts, then find the tests for check_platform_measurement and checkPlatformMeasurement. Check how each function handles absent, empty, and non-string runtime.measurement values, and verify the returned outcome and cause against the proposed behavior. Pull request #633 is already open for this issue.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Summary
Direct calls to check_platform_measurement (src/agentrust_trace/platform_measurement.py) and checkPlatformMeasurement (trust-record-verify/src/platform.ts) do not require runtime.measurement to be a non-empty string:
- Non-string or empty
runtime.measurementaccepted incheck_platform_measurement/checkPlatformMeasurement:- Both implementations check only
runtime.get("measurement") is None(ormeasurement === undefined || measurement === nullin TypeScript). - If
record={"runtime": {"measurement": 123}},record={"runtime": {"measurement": ""}}, orrecord={"runtime": {"measurement": True}}is passed directly and the caller's appraiser echoes{"measurement": runtime["measurement"], "layers": {"pcr:0": "established"}}, both functions returnoutcome="appraised"with a non-string or emptyevidence["measurement"], violating the documented contract thatmeasurementis a non-empty string ("measurement, the string it appraised") andevidenceis JSON-serializable.
- Both implementations check only
Proposed Fix
- In
check_platform_measurement(Python) andcheckPlatformMeasurement(TypeScript), requireisinstance(measurement, str) and bool(measurement)(in TS:typeof measurement === "string" && measurement !== ""), returningnot_attemptedwithcause="field_absent"whenruntime.measurementis absent, empty, or not a string.
- Ngôn ngữ chính
- Python
- Star
- 37
- Fork
- 33
- Merge trung bình
- 1 ngày 18 giờ
- Pull request đã merge (30 ngày)
- 118
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
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 agentrust-io/trace-spec
-
prototype(tdx_collateral): reject non-finite JSON, non-minimal/duplicate PCK OIDs, boolean integer fields, and non-list advisoryIDsCó thể đã có người làm @drk-ram đã nhận hôm nay. Đang mởneeds-review:MEDIUM
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 30/100
agentrust-io/trace-spec#644 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
prototype(gate_store): reject float overflow, out-of-range integers, empty identifiers, and invalid RemoteGateStore timeoutCó thể đã có người làm @drk-ram đã nhận hôm nay. Đang mởneeds-review:MEDIUM
Độ khó 3/5 Nửa ngày Mức phù hợp với người mới 35/100
agentrust-io/trace-spec#645 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
prototype(snp_collateral): verify VCEK signature against ASK and enforce canonical HCL base64, report version, and component boundsCó thể đã có người làm @drk-ram đã nhận hôm nay. Đang mởneeds-review:MEDIUM
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
agentrust-io/trace-spec#646 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
fix(delegation): reject private JWKs in trusted_root_keys, duplicate lattice entries, and invalid credential boundsCó thể đã có người làm @drk-ram đã nhận hôm nay. Đang mởneeds-review:MEDIUM
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 38/100
agentrust-io/trace-spec#647 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
conformance(loader,report): reject non-standard JSON constants in loads_strict and validate record_digest/build inputsCó thể đã có người làm @drk-ram đã nhận hôm nay. Đang mởneeds-review:MEDIUM
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
agentrust-io/trace-spec#648 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của agentrust-io/trace-spec
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
vllm-project/vllm#64845 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
dekobon/big-code-analysis#1729 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Add `openai_safety_identifier`, the replacement for the `user` field that `openai_user` sendsĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
pydantic/pydantic-ai#12091 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/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 82/100