Skip to content

Omit Security session traces from span reads - #1856

Merged
JacobStephens2 merged 1 commit into
mainfrom
issue-1855
Nov 7, 2026
Merged

JacobStephens2 merged 1 commit into
mainfrom
issue-1855

Conversation

@JacobStephens2

@JacobStephens2 JacobStephens2 commented Nov 7, 2026 •

Copy link
Copy Markdown
Owner

Summary

span or waterfall read
  caller has the security scope
    load every Session trace on the Command
  caller does not
    skip Security session files
    keep the Command's other stages
  single span
    return that span from the same tree

An ordinary Run keeps its other stages. A Security session on that Run stays out of span, waterfall, and single-span reads unless the caller has the security scope.

The omission was already in load_without_security_sessions. This change locks the single-span read, the ordinary Run, and the session's tool call.

Seams

  • Console span and waterfall reads (/api/v1/spans, /api/v1/waterfall) for a token with and without the security scope
  • A single-span read (/api/v1/spans?span=<id>) of that Security session, its tool call, and the Run's ordinary session

Evidence

Execution evidence

  • Before: The first draft of the regression also requested the HTML waterfall with a bearer token. That route returns the sign-in page, so the assertion failed before it reached the API reads:
/waterfall?command=widgets%237 hid an ordinary session from a read token: <!doctype html>
<title>Sign in · thirdshift · thirdshift</title>

The product filter was not the failure. The HTML route is not a token read, so that request was removed.

After: cargo test --test console tokens::read_scope_cannot_read_a_security_session_through_spans -- --exact

test tokens::read_scope_cannot_read_a_security_session_through_spans ... ok
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 264 filtered out; finished in 0.90s

Unaddressed findings

None. Standards and Spec each reported no findings. The review left no changed file unread.

Security

No unaddressed introduced findings.

Security review outcome

No unaddressed introduced findings.

Merge Danger

Door: two-way

Test-only. Reverting the commit removes the regression and leaves the span filter as it is.

Blast Radius: none

No runtime change. The new assertions cover Console span reads for an ordinary Run.

Closes #1855

Built with grok grok 1.0.70 (f50904eaee6c) [stable] · default model · default effort

A read token can open an ordinary Run's span and waterfall routes. Those
routes already skip Security session files. The regression now also asks
for that session and its tool call by span id, and checks the Run's other
stage and ordinary session stay visible. A security token still receives
the trace.
@JacobStephens2
JacobStephens2 merged commit 247f5a5 into main Nov 7, 2026
4 checks passed
@JacobStephens2
JacobStephens2 deleted the issue-1855 branch November 7, 2026 10:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Omit Security session traces from span reads

1 participant