Repository navigation
Conversation
Contributor
decision-model-linteraudit
decision-model-linter: 90 calls on 30 files, 171,786 input tokens, $0.0072, model typesafe/jev-1.13-20260917 |
gricha
force-pushed
the
ref/sa-narrow-api-b
branch
from
November 1, 2026 04:24
6dbeab1 to
9491893
Compare
`api/base.py`, `api/bases/organization.py`, `api/decorators.py`, the group-index helpers and 22 org/project endpoints read the caller through `sentry.auth.principal`: who-did-this columns, analytics and Seer context use `acting_user_id()`; "mine" lookups (recent searches, prompts, monitoring identities) use `owned_by_acting_user()`; personal writes, user-only attributes and NOT NULL actors use `require_user()`. Per-request paths: the 2FA check and the release cache key call `require_user()` only after checks a service account never passes (it has no member row; service-account auth is excluded), and `primary_email_verification_required` now answers a service account with 403 instead of an `AttributeError`. - A service account gets empty prompts and recent searches, and can save transaction thresholds; recent-search POST, weekly-report exclusions, agentic onboarding and service hooks are 403 `user-required`. New tests cover five of these. - Token callers get 401 instead of a 500 on recent-search POST and weekly-report exclusions. - Users and agents see no change. Left: three `features.batch_has(actor=request.user)` calls (widening it reaches getsentry's handlers), `_get_member`, `organization_releases` serialize, `prompts_activity` PUT and `organization_auth_tokens`.
gricha
force-pushed
the
ref/sa-narrow-api-b
branch
from
November 1, 2026 04:57
9491893 to
3326f75
Compare
Contributor
Sentry Snapshot Testing
|
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
api/base.py,api/bases/organization.py,api/decorators.py, the group-index helpers and 22 org/project endpoints read the caller throughsentry.auth.principal: who-did-this columns, analytics and Seer context useacting_user_id(); "mine" lookups (recent searches, prompts, monitoring identities) useowned_by_acting_user(); personal writes, user-only attributes and NOT NULL actors userequire_user().Per-request paths: the 2FA check and the release cache key call
require_user()only after checks a service account never passes (it has no member row; service-account auth is excluded), andprimary_email_verification_requirednow answers a service account with 403 instead of anAttributeError.user-required. New tests cover five of these.Left: three
features.batch_has(actor=request.user)calls (widening it reaches getsentry's handlers),_get_member,organization_releasesserialize,prompts_activityPUT andorganization_auth_tokens.