Skip to content

fix(trace-adapters): reject boolean capture timestamps and non-canonical base64 signatures in openshell adapters (#368) - #371

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

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

Conversation

@drk-ram

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

Copy link
Copy Markdown

Summary

  • Require type(capture_complete) is bool and type(capture_start) is int, type(capture_end) is int, and 0 <= capture_start <= capture_end <= 2**53 - 1 in packages/agentrust-trace-adapters/src/agentrust_trace_adapters/openshell.py (build_transcript).
  • Require len(signed) == 64 and base64.b64encode(signed).decode("ascii") == encoded in packages/agentrust-trace-adapters/src/agentrust_trace_adapters/openshell_bundle.py (verify_bundle).

Closes #368

Validation

  • python -m pytest packages/agentrust-trace-adapters/tests/test_openshell_bundle.py packages/agentrust-trace-adapters/tests/test_openshell.py -q

…cal base64 signatures in openshell adapters (agentrust-io#368)

- Require boolean capture_complete and integer 0 <= capture_start <= capture_end <= 2**53 - 1 in openshell.build_transcript.
- Require canonical 64-byte base64 signatures in openshell_bundle.verify_bundle.

Closes agentrust-io#368

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

github-actions Bot commented Oct 23, 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 23, 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 33b576b6aea9dee9efd2255cc8f56ba9107470cb in an isolated checkout.

Capture completeness now requires literal true and timestamps require ordered, bounded integers rather than booleans. I also exercised a genuinely signed bundle: the original signature verifies; changing only unused base64 pad bits preserves its decoded bytes but is rejected by this head. Restoring the actual merge-base bundle verifier accepts that same alias, so the canonicality check is independently exercised rather than masked by a bad signature.

Validation in the hash-locked Python 3.12.10 adapter environment: 128 adapter tests plus the OpenShell integration test passed; pip check and scoped Ruff passed. Sign-offs are present. Please trim the extra blank line at test_openshell_bundle.py EOF. No blocking source finding; 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

Development

Successfully merging this pull request may close these issues.

fix(trace-adapters): reject boolean capture timestamps and non-canonical base64 signatures in openshell adapters

2 participants