Skip to content

ref(integrations): Increase default per_page for paginated repo fetch…

d58dec5
Select commit
Loading
Failed to load commit list.
Closed

feat(integrations): Add paginated repo fetching for GitHub integration #112426

ref(integrations): Increase default per_page for paginated repo fetch…
d58dec5
Select commit
Loading
Failed to load commit list.
@sentry/warden / warden completed Apr 8, 2026 in 2m 3s

1 issue

Medium

ZeroDivisionError when per_page=0 is passed as query parameter - `src/sentry/integrations/api/endpoints/organization_integration_repos.py:105-108`

The code at line 105 sets per_page = min(int(request.GET.get("per_page", 100)), 100) which allows values less than 1, including 0 and negative numbers. When per_page=0 is passed, line 108 page_number = (cursor.offset // per_page) + 1 raises an unhandled ZeroDivisionError, resulting in a 500 error. This matches the Value Validation Errors pattern (Check 4) where input validation is insufficient before use.

2 skills analyzed
Skill Findings Duration Cost
sentry-security 0 1m 42s $1.56
sentry-backend-bugs 1 1m 56s $2.77

Duration: 3m 38s · Tokens: 2.8M in / 21.1k out · Cost: $4.34 (+extraction: $0.01, +fix_gate: $0.00, +dedup: $0.00)