Skip to content

Bulk-scan account selection only lists the first 100 GitHub organizations #135

Description

@GautamSharma99

Summary

The interactive bulk-scan account selector requests one page from GET /user/orgs:

selectGitHubOwner lines 195-214

The request sets per_page: 100 but does not follow pagination. Users belonging to more than 100 organizations therefore see only the first page plus their personal account.

This is inconsistent with repository discovery immediately below it, which correctly follows GraphQL pagination until the cutoff or final page.

Why this matters

Organizations beyond the first page cannot be selected for bulk scanning. The prompt does not indicate that the account list is incomplete, so the behavior looks like missing permissions or an authentication problem.

The ordering can also change as organization memberships change, making access to later organizations unpredictable.

Expected behavior

Every organization visible to the authenticated GitHub account should be available in the selector, subject to a clearly documented safety ceiling if one is needed.

Suggested direction

Use Octokit's pagination helper or follow REST Link headers, forwarding the abort signal to every request. Deduplicate organizations before sorting alongside the personal account.

Add a test server response with at least two organization pages and verify:

  • both pages are requested;
  • a second-page organization is selectable;
  • cancellation stops further pagination;
  • the personal account remains present.

The existing tests return all configured organizations in a single response and therefore do not exercise REST pagination.

Found by static audit of upstream main at 9c7634b.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions