WorkScope latest pointer accepts a contract that contradicts its verified bundle
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 68/100
調査の方向性
src/devostasis/workscope/bundle.pyを読み、169~183行目のlatest()に注目し、build()とpublish()ヘルパーを使用する既存のテストを確認します。正規ポインターが通ることを確認したら、その契約だけをもう一方のサポート対象の値に変更し、latest()がScopeError("latest pointer binding mismatch")を送出することを検証します。一致する過去のv1ポインターは引き続き通るはずです。
索引モデルが issue の本文から書いたものです。
説明
Finding — the WorkScope latest pointer admits a contradictory contract field
Pinned repository source: release/0.6.0@6d935ee111e2efab7a5f7d7c8f8d050af8d35567; src/devostasis/workscope/bundle.py Git blob 2de1ef2b47b983ffad6f45bd32262cb4b8d655b1, latest() lines 169–183; src/devostasis/workscope/__init__.py blob a2cfa113dbc7904c6f0ca7c24ae85f2d749358ed. The source and CONTRIBUTING.md were read on 2026-11-17.
The canonical publish() writes the actual bundle contract into latest.json:
atomic(pointer, canonical_bytes({
"contract": decoded["manifest.json"]["contract"],
"bundle_id": bundle_id,
"manifest_digest": digest_bytes(content["manifest.json"]),
"project": identity(scope["subject"])
}))
latest() only requires data["contract"] in CONTRACTS, which currently includes both devostasis.work.v1 and devostasis.work.v2. It then validates the referenced bundle's digest, ID, project and CANONICAL context, but never compares the pointer's contract to decoded["manifest.json"]["contract"].
Thus a canonical, verified WorkScope v2 bundle can be left untouched while the mutable latest.json pointer is edited to say "contract":"devostasis.work.v1". The pointer remains shape-valid, and every existing binding predicate can pass, despite the pointer falsely naming a different replay contract. devostasis work verify --latest / replay --latest can then report VERIFIED for a pointer with internally contradictory metadata. The immutable bundle still independently verifies; this is a pointer metadata-consistency false acceptance, not proof that the returned bundle's contents are corrupt or that Vital evaluation changes.
Reproduction / verification boundary
An isolated exact-predicate control with both contracts in the actual CONTRACTS tuple produced: allowed-pointer-contract=True; bundle_id-match=True; digest-match=True; project-match=True; canonical-context=True; pointer-contract-equals-manifest-contract=False; the conjunction of all currently enforced predicates was True. This is a source/predicate reproduction, not imported full-package pytest or a live WorkScope CLI invocation.
Focused implementation (no semantic policy change)
Inside latest()'s final binding require, add the missing equality without changing the supported contract set:
require(digest_bytes(content["manifest.json"]) == data["manifest_digest"] and
+ decoded["manifest.json"]["contract"] == data["contract"] and
decoded["manifest.json"]["bundle_id"] == data["bundle_id"] and
identity(decoded["scope.json"]["subject"]) == data["project"] and
decoded["scope.json"]["subject"]["context"] == "CANONICAL", "latest pointer binding mismatch")
This is an implementation-local consistency check: canonical publish() already emits matching fields. It neither changes version dispatch nor the verified bundle's identity/replay.
Acceptance and verification shape
- Build/publish a real canonical WorkScope v2 bundle with the existing
build()/publish()test helpers. Verify thatlatest(root),work verify --latest, andwork replay --latestaccept the unmodified pointer. - Edit only
latest.json["contract"]from the actual v2 value to the other supported v1 value; keepbundle_id,manifest_digest,projectand every immutable bundle byte unchanged. Requirelatest(root)to raiseScopeError("latest pointer binding mismatch"); both CLI variants must fail, never emitVERIFIED. A later canonicalpublish()must not silently promote/rely on the contradictory pointer. - Historical legitimate v1 WorkScope bundles/pointers whose two contracts match must still pass; existing pointer-digest tamper and replay regressions stay green. Add an implementation-local test and docs/conformance citation only if a permanent case ID is introduced.
- Run real offline pytest, bundle replay and installed-wheel verification, plus exact-head CI. Use a focused fix branch targeting
release/0.6.0and independent review before merging.
Deduplication and boundary
Searched open and closed Issues and PRs for "latest.json" "contract", "pointer" "contract", and "latest pointer" "binding". Existing #147 is about the unbounded actual read of latest.json, not a mismatched-but-allowed contract; #146 is about member read budgets. The fix may share a focused release PR with #147 if convenient, but preserve separate test coverage.
Permissions / limits: authenticated andy-zen-dev has pull=true, push=false, triage=false, maintain=false, admin=false. This issue is the actual durable deliverable; no branch, code commit, PR, merge or release is claimed. Full Devostasis pytest/CLI/CI on a fixing commit: NOT_RUN.
- 主要言語
- Python
- スター
- 6
- フォーク
- 1
- 平均マージ
- 6分
- マージ済み PR(30日)
- 1
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
drevendev/Devostasis のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
drevendev/Devostasis#158 · コメント 1 件 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 65/100
drevendev/Devostasis#25 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 55/100
drevendev/Devostasis#157 · コメント 3 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 45/100
drevendev/Devostasis#156 · コメント 2 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 32/100
drevendev/Devostasis#155 · コメント 9 件 ·
drevendev/Devostasis の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
vllm-project/vllm#69791 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
Special topics rows on the Courses page have misaligned columns対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
BCStudentSoftwareDevTeam/cas#481 ·
メンテナーはふだん 7 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信