Skip to content

fix(trace-adapters): validate timestamps/counts, require bool signature_verified, and reject private JWKs in build_record (#375) - #380

Open
drk-ram wants to merge 1 commit into
agentrust-io:mainfrom
drk-ram:drk-ram-fix-trace-adapters-375
Open

drk-ram wants to merge 1 commit into
agentrust-io:mainfrom
drk-ram:drk-ram-fix-trace-adapters-375

Conversation

@drk-ram

@drk-ram drk-ram commented Oct 25, 2026

Copy link
Copy Markdown

Closes #375

Summary

  • Require signature_verified is True, non-empty str verifier / policy_ref, and positive RFC 8785 safe int timestamp in AppraisalEvidence.__post_init__.
  • Require exact int ingested_at in SourceSystem.__post_init__.
  • Validate iat (positive RFC 8785 safe int), tool_call_count (non-negative RFC 8785 safe int), and reject private/symmetric JWK parameters ("d", "p", "q", "dp", "dq", "qi", "oth", "k") in build_record.
  • Add unit tests in packages/agentrust-trace-adapters/tests/test_appraisal.py.

Validation

  • pytest packages/agentrust-trace-adapters/tests/test_appraisal.py packages/agentrust-trace-adapters/tests/test_builder.py -q — passed (34 passed)

…re_verified, and reject private JWKs in build_record (agentrust-io#375)

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Raghuvar Durga <177662415+drk-ram@users.noreply.github.com>
@drk-ram
drk-ram requested review from a team, carloshvp and imran-siddique as code owners October 25, 2026 06:59
@github-actions

github-actions Bot commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

🟡 Contributor Check: MEDIUM

Check Result
Profile MEDIUM
Credential LOW
Overall MEDIUM

Automated check by AgenTrust Contributor Check.

@github-actions github-actions Bot added the needs-review:MEDIUM Contributor check flagged MEDIUM risk label Oct 25, 2026

@carloshvp carloshvp left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed exact head ce90b47c25a0ab4ce60470557d4d59f941f91f9c in an isolated checkout.

The evidence/record builders now require literal boolean signature_verified, bounded integer timestamps/counts, public-only JWK inputs and integer ingestion times. The focused control passes here and fails with the baseline modules restored, including the package's public exports. All 128 adapter tests, pip check, the repository CI Ruff subset and diff whitespace checks passed in a fresh hash-locked adapter environment. This validates input/evidence handling, without independently certifying a source system's appraisal or provenance. No blocking finding in the changed paths; hosted checks and maintainer policy remain separate.

Reviewed with OpenAI Codex.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-review:MEDIUM Contributor check flagged MEDIUM risk

Projects

None yet

2 participants