Skip to content

fix: improve seer automation endpoint#107235

Merged
JoshFerge merged 2 commits intomasterfrom
jferg/seer-automation-improvements
Jan 29, 2026
Merged

fix: improve seer automation endpoint#107235
JoshFerge merged 2 commits intomasterfrom
jferg/seer-automation-improvements

Conversation

@JoshFerge
Copy link
Member

@JoshFerge JoshFerge commented Jan 29, 2026

various improvments

@JoshFerge JoshFerge requested a review from a team as a code owner January 29, 2026 14:29
@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Jan 29, 2026
@JoshFerge JoshFerge enabled auto-merge (squash) January 29, 2026 14:35
@JoshFerge JoshFerge disabled auto-merge January 29, 2026 14:41
Update repository validation in both endpoints to handle provider format
mismatch between API requests (e.g., "github") and database storage
(e.g., "integrations:github"). Also adds ObjectStatus.ACTIVE filter to
exclude deleted repositories.
Copy link
Contributor

@cursor cursor bot left a comment

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.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

@JoshFerge JoshFerge merged commit 11867df into master Jan 29, 2026
69 checks passed
@JoshFerge JoshFerge deleted the jferg/seer-automation-improvements branch January 29, 2026 15:10
priscilawebdev pushed a commit that referenced this pull request Feb 2, 2026
## Summary

Improve repository validation in Seer automation endpoints to fix IDOR
vulnerabilities and provider format handling.

### Changes

1. **IDOR fix for `OrganizationAutofixAutomationSettingsEndpoint`** -
Validates that repositories in `projectRepoMappings` exist and belong to
the organization before processing

2. **Provider format handling** - Updates repository validation in both
endpoints to handle the mismatch between API requests (e.g., `"github"`)
and database storage (e.g., `"integrations:github"`) using Q objects
with OR conditions

3. **Active status filter** - Adds `status=ObjectStatus.ACTIVE` to
exclude deleted repositories from validation

### Files Modified
-
`src/sentry/seer/endpoints/organization_autofix_automation_settings.py`
- `src/sentry/seer/endpoints/project_seer_preferences.py`
billyvg added a commit that referenced this pull request Feb 5, 2026
I missed that this was broken recently due to a backend change: #107235

id === `integrations:${provider.name.toLowerCase}`, so changing what we send to `provider` may break other things, so change it back to use name
billyvg added a commit that referenced this pull request Feb 9, 2026
I missed that this was broken recently due to a backend change:
#107235 -- specifically
[here](https://github.com/getsentry/sentry/pull/107235/changes#diff-069c881c439f4ff7260f1e9bad598201a9b4798611320656c675571d640a5a2fR258)

id === `integrations:${provider.name.toLowerCase}`, so changing what we
send as `provider` may break other things, so change it back to use
provider.name
jaydgoss pushed a commit that referenced this pull request Feb 12, 2026
I missed that this was broken recently due to a backend change:
#107235 -- specifically
[here](https://github.com/getsentry/sentry/pull/107235/changes#diff-069c881c439f4ff7260f1e9bad598201a9b4798611320656c675571d640a5a2fR258)

id === `integrations:${provider.name.toLowerCase}`, so changing what we
send as `provider` may break other things, so change it back to use
provider.name
@github-actions github-actions bot locked and limited conversation to collaborators Feb 14, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

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