Skip to content

fix(verify): enforce credential validity windows and hop timestamp ordering in cross_check_trace_dag (#306) - #308

Open
drk-ram wants to merge 1 commit into
agentrust-io:mainfrom
drk-ram:fix-lineage-hop-times
Open

drk-ram wants to merge 1 commit into
agentrust-io:mainfrom
drk-ram:fix-lineage-hop-times

Conversation

@drk-ram

@drk-ram drk-ram commented Nov 6, 2026

Copy link
Copy Markdown

What

Enforce delegation credential validity windows (iat, nbf, exp) and non-decreasing hop timestamps (iat) against parent hops inside cross_check_trace_dag (ca2a verify-lineage).

Why

cross_check_trace_dag checked hop signatures, subject/issuer continuity, and scope attenuation, but never compared a hop record's iat against the matched delegation credential's [nbf, exp] validity window or the parent hop's iat. As a result, hop records signed after credential expiry, before nbf/iat, or backdated before their parent hop were reported as authenticated_lineage.

Closes #306

Security impact

Prevents expired, premature, or backdated hop records from passing cross_check_trace_dag and ca2a verify-lineage as authenticated_lineage.

Test plan

  • pytest passes (pytest tests/unit/test_trace_binding.py tests/unit/test_lineage_cli.py — 71 passed)
  • ruff check passes (ruff check src tests — passed)
  • mypy passes (mypy src — passed)
  • Manual test performed (describe steps below if applicable)

DCO sign-off

  • My commits include Signed-off-by: (git commit -s)

Signed-off-by: Raghuvar Karthik Durga <177662415+drk-ram@users.noreply.github.com>
@drk-ram
drk-ram requested review from a team, carloshvp and zohebk8s as code owners November 6, 2026 16:30
@github-actions

github-actions Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

🔴 Contributor Check: HIGH

Check Result
Profile HIGH
Credential LOW
Overall HIGH

Automated check by AgenTrust Contributor Check.

@github-actions github-actions Bot added the needs-review:HIGH Contributor check flagged HIGH risk label Nov 6, 2026

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:HIGH Contributor check flagged HIGH risk

Projects

None yet

1 participant