Skip to content

[PM-32508] Remove plan-type endpoint which is no longer used#7177

Open
JaredScar wants to merge 1 commit intomainfrom
ac/pm-32508-remove-information-disclosure-vuln
Open

[PM-32508] Remove plan-type endpoint which is no longer used#7177
JaredScar wants to merge 1 commit intomainfrom
ac/pm-32508-remove-information-disclosure-vuln

Conversation

@JaredScar
Copy link
Contributor

🎟️ Tracking

https://bitwarden.atlassian.net/browse/PM-32508

📔 Objective

Removes the plan-type endpoint from OrganizationsController which is no longer used by AdminConsole team or any teams to resolve vulnerability where this endpoint could be used to find out organization's plan type if the ID is known...

@JaredScar JaredScar requested a review from a team as a code owner March 9, 2026 15:34
@JaredScar JaredScar requested a review from BTreston March 9, 2026 15:34
@JaredScar JaredScar added the ai-review Request a Claude code review label Mar 9, 2026
@claude
Copy link
Contributor

claude bot commented Mar 9, 2026

Claude finished @JaredScar's task in 1m 28s —— View job


Summary

PR: PM-32508 Remove plan-type endpoint which is no longer used

No issues found. This PR cleanly removes the GetPlanType endpoint from OrganizationsController, which is a security-positive change.

What changed

A single endpoint was deleted from /src/Api/AdminConsole/Controllers/OrganizationsController.cs (12 lines removed, 0 lines added):

  • Removed: [HttpGet("{id}/plan-type")] - The GetPlanType method that returned an organization's PlanType by ID.

Why this is correct

The removed endpoint had no authorization check beyond the controller-level [Authorize("Application")] attribute. Any authenticated user who knew an organization's GUID could query its plan type -- an information disclosure vulnerability. Other endpoints in the same controller (e.g., Get, Put, Delete) correctly verify the caller's relationship to the organization via _currentContext.OrganizationOwner() or similar checks.

Verification

  • No references to GetPlanType or the /plan-type route remain anywhere in src/ or test/.
  • The --plan-type CLI flag in util/SeederUtility/ is unrelated (a local tooling argument, not an API route).
  • No test files covered this endpoint, consistent with it being unused.

Verdict: Clean removal of dead code that closed an information disclosure vulnerability. Low risk, no concerns.

@sonarqubecloud
Copy link

sonarqubecloud bot commented Mar 9, 2026

@github-actions
Copy link
Contributor

github-actions bot commented Mar 9, 2026

Logo
Checkmarx One – Scan Summary & Details08fa50ea-ca8a-4d32-97f8-817aed6da489

Great job! No new security vulnerabilities introduced in this pull request

@codecov
Copy link

codecov bot commented Mar 9, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 56.89%. Comparing base (7667789) to head (a604f55).
⚠️ Report is 4 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #7177   +/-   ##
=======================================
  Coverage   56.88%   56.89%           
=======================================
  Files        2028     2028           
  Lines       88830    88822    -8     
  Branches     7918     7917    -1     
=======================================
  Hits        50532    50532           
+ Misses      36468    36460    -8     
  Partials     1830     1830           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai-review Request a Claude code review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant