-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
fix(api): tighten published mutation scopes #113261
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
ed5c642
test(api): Require notes for readonly mutation scopes
dcramer bd30311
fix(api): Require write scopes on mutation paths
dcramer 2ecd032
fix(api): narrow write scope mutation changes
dcramer 2f08f09
chore(meta): Add CODEOWNERS coverage for markdownTextArea
dcramer 236d262
ref(replays): Expand explicit replay scopes
dcramer e8cab3e
fix(replays): require event write for replay deletes
dcramer 654e6e9
ref(api): defer incident mutation scope tightening
dcramer a56d27b
ref(api): document helper permission intent
dcramer d511a66
test(api): Add regression coverage for tightened scopes
dcramer 9c46864
test(api): Fix write-scope regression tests
dcramer 4251e3d
fix(api): Align alert serializers with write scopes
dcramer 63536e9
fix(api): Tighten alert mutations and replay delete scope
dcramer 47cec09
fix(api): Unwrap org context in alert mutations
dcramer 7871ad4
fix(api): annotate readonly mutations and alert compat
dcramer 76e97a9
fix(api): Preserve anomaly permission resolution
dcramer a64e276
fix(api): Preserve detector detail 404 behavior
dcramer f4a8ba6
fix(api): simplify alert mutation permission cleanup
dcramer 7ac8126
fix(api): Restore write scope compatibility
dcramer 182a529
fix(workflow-engine): Fix workflow type-check regressions
dcramer 1b142d9
fix(api): Document readonly mutation exceptions
dcramer 3b6479f
ref(api): Reuse alerting mutation permissions
dcramer 440ad5a
fix(api): Preserve workflow detail legacy scopes
dcramer c214378
style(workflow-engine): Remove duplicate detector import
dcramer 6d54948
fix(api): Tighten alert and event mutation scopes
dcramer 42fcd49
docs(api): Mark personal scope cleanup follow-up
dcramer File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Team scope fallback ignores target project
Medium Severity
_has_any_team_scopereturnsTruewhenever the requester hasalerts:writeon any team they belong to, regardless of whether that team is associated with the targeted resource's project. Whenget_alert_mutation_projectsreturnsNone(e.g. multi-projectAlertRule, missing kwargs, or unhandled methods likePOSTon detail endpoints),has_object_permissionfalls through to this team-wide check, granting the request even though body-level enforcement may not exist or may not match this codepath.Additional Locations (1)
src/sentry/api/bases/organization.py#L334-L341Reviewed by Cursor Bugbot for commit 42fcd49. Configure here.