Skip to content

ref(seer): Narrow request.user in Seer endpoints - #129420

Open
gricha wants to merge 1 commit into
ref/sa-narrow-issuesfrom
ref/sa-narrow-seer
Open

gricha wants to merge 1 commit into
ref/sa-narrow-issuesfrom
ref/sa-narrow-seer

Conversation

@gricha

@gricha gricha commented Oct 31, 2026 •

Copy link
Copy Markdown
Member

Seer endpoints read the caller through sentry.auth.principal: user ids sent to Seer, run lookups and coding-agent polling use acting_user_id(); autofix, push-changes and issue summary get acting_user(); the agent-approve grant uses require_user().

  • A service account can start and read autofix runs (new test), and issue summary, issue-view titles, chat suggestions and supergroups send Seer no user id instead of a service-account id. Continuing or updating a chat and search-agent state deny it like token callers.
  • Users, agents and token callers see no change.

Left: organization_agent_token.py passes the caller to resolve_minting_principal, which should reject callers with no user explicitly; today a service account is denied only because its id fails as an int.

@gricha
gricha added this pull request to stack #129364 October 31, 2026 02:27
@github-actions github-actions Bot added the Scope: Backend Automatically applied to PRs that change backend components label Oct 31, 2026
@sentry

sentry Bot commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

Sentry Snapshot Testing

Name Added Removed Changed Renamed Unchanged Skipped Status
sentry-frontend
sentry-frontend
- - - - - - ⏳ Processing

⚙️ sentry-frontend Snapshot Settings

@gricha
gricha removed this pull request from stack #129364 November 1, 2026 04:24
@gricha
gricha force-pushed the ref/sa-narrow-seer branch from a0a3dd2 to aaeb5eb Compare November 1, 2026 04:24
@gricha
gricha added this pull request to stack #129440 November 1, 2026 04:24
@gricha
gricha force-pushed the ref/sa-narrow-seer branch 3 times, most recently from d44c90c to e9cb342 Compare November 2, 2026 20:14
@gricha
gricha force-pushed the ref/sa-narrow-seer branch 2 times, most recently from 2a032fb to 8022212 Compare November 2, 2026 20:33
@gricha
gricha force-pushed the ref/sa-narrow-seer branch from 8022212 to 42cc614 Compare November 2, 2026 20:35
@gricha
gricha marked this pull request as ready for review November 2, 2026 21:03
@gricha
gricha requested review from a team as code owners November 2, 2026 21:03
@gricha
gricha requested review from azulus and skaasten November 2, 2026 21:12
@gricha
gricha removed this pull request from stack #129440 November 2, 2026 21:45
@gricha
gricha added this pull request to stack #129572 November 2, 2026 21:45
@gricha
gricha force-pushed the ref/sa-narrow-seer branch from 42cc614 to decf8a3 Compare November 2, 2026 22:08

@cursor cursor Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Stale Bugbot comment from a previous run.

@gricha
gricha force-pushed the ref/sa-narrow-seer branch 2 times, most recently from 0c97862 to 122140c Compare November 2, 2026 23:08

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

There are 2 total unresolved issues (including 1 from previous review).

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 122140c. Configure here.

@gricha
gricha force-pushed the ref/sa-narrow-seer branch 3 times, most recently from f171c16 to 47dd219 Compare November 3, 2026 00:27
Seer endpoints read the caller through `sentry.auth.principal`: user ids sent to Seer, run lookups and coding-agent polling use `acting_user_id()`; autofix, push-changes and issue summary get `acting_user()`; the agent-approve grant uses `require_user()`.

- A service account can start and read autofix runs (new test), and issue summary, issue-view titles, chat suggestions and supergroups send Seer no user id instead of a service-account id. Continuing or updating a chat and search-agent state deny it like token callers.
- Users, agents and token callers see no change.

Left: `organization_agent_token.py` passes the caller to `resolve_minting_principal`, which should reject callers with no user explicitly; today a service account is denied only because its id fails as an int.
@gricha
gricha force-pushed the ref/sa-narrow-seer branch from 47dd219 to 2a3e5a2 Compare November 3, 2026 00:34

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

Scope: Backend Automatically applied to PRs that change backend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants