ca2a_runtime.response: PendingResponse accepts boolean timeout, ResponseProducer.finish does not validate status/body invariants, and AuthenticatedPeerError drops error detail

オープン
#284 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@drk-ram がすでに取り組んでいます。

2026年10月25日 から。

  • #289 @drk-ram による — オープン

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
20/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
停滞
技術スタック
python
領域
api, backend, security

調査の方向性

Start with src/ca2a_runtime/response.py and trace PendingResponse.__init__, decode, and ResponseProducer.finish; then inspect AuthenticatedPeerError.__init__ and its CA2AError base. Find the relevant tests for timeout validation, decoding, status/body invariants, and preserved error detail. Done when each reported case is covered and the tests pass; pull request #289 is already open.

索引モデルが issue の本文から書いたものです。

説明

needs-review:MEDIUM
Summary
  1. PendingResponse.__init__ in src/ca2a_runtime/response.py checks math.isfinite(timeout) and 0 < timeout <= 300 without rejecting bool, so timeout=True is silently accepted as 1.0 second.
  2. decode(raw) does not reject non-bytes raw with ResponseAuthenticationFailed.
  3. ResponseProducer.finish(status, body) MACs any status and body without enforcing the status/body invariants required by PendingResponse.verify (type(status) is int, status == 200 or 400 <= status <= 599, body.get("accepted") is True on 200, and isinstance(body.get("error"), dict) on non-200).
  4. AuthenticatedPeerError.__init__ drops error.get("detail") instead of passing it to CA2AError.__init__.
主要言語
Python
スター
9
フォーク
14
平均マージ
1日 8時間
マージ済み PR(30日)
36

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

agentrust-io/ca2a のほかの issue

agentrust-io/ca2a の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。