Skip to content
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

[PM-3175] Invite Organization Users Command Refactor #5394

Draft
wants to merge 19 commits into
base: main
Choose a base branch
from

Conversation

jrmccannon
Copy link
Contributor

@jrmccannon jrmccannon commented Feb 11, 2025

🎟️ Tracking

PM-3175

📔 Objective

Refactoring the current Invite User Organization flow to fail faster and optimize calls.

⏰ Reminders before review

  • Contributor guidelines followed
  • All formatters and local linters executed and passed
  • Written new unit and / or integration tests where applicable
  • Protected functional changes with optionality (feature flags)
  • Used internationalization (i18n) for all UI strings
  • CI builds passed
  • Communicated to DevOps any deployment requirements
  • Updated any necessary documentation (Confluence, contributing docs) or informed the documentation team

🦮 Reviewer guidelines

  • 👍 (:+1:) or similar for great changes
  • 📝 (:memo:) or ℹ️ (:information_source:) for notes or general info
  • ❓ (:question:) for questions
  • 🤔 (:thinking:) or 💭 (:thought_balloon:) for more open inquiry that's not quite a confirmed issue and could potentially benefit from discussion
  • 🎨 (:art:) for suggestions / improvements
  • ❌ (:x:) or ⚠️ (:warning:) for more significant problems or concerns needing attention
  • 🌱 (:seedling:) or ♻️ (:recycle:) for future improvements or indications of technical debt
  • ⛏ (:pick:) for minor or nitpick changes

Copy link

Copy link

codecov bot commented Feb 11, 2025

Codecov Report

Attention: Patch coverage is 45.52352% with 359 lines in your changes missing coverage. Please review.

Project coverage is 44.21%. Comparing base (669c253) to head (ec76bb7).
Report is 39 commits behind head on main.

Files with missing lines Patch % Lines
...rganizationUsers/InviteOrganizationUsersCommand.cs 7.95% 80 Missing and 1 partial ⚠️
...anizationUsers/Validation/InviteUsersValidation.cs 4.81% 79 Missing ⚠️
...ers/Validation/SecretsManagerSubscriptionUpdate.cs 0.00% 25 Missing ⚠️
...tion/InvitingUserOrganizationProviderValidation.cs 0.00% 20 Missing ⚠️
...s/Validation/SecretsManagerInviteUserValidation.cs 0.00% 17 Missing ⚠️
...ionUsers/Requests/InviteOrganizationUserRequest.cs 0.00% 16 Missing ⚠️
...re/AdminConsole/Models/Business/OrganizationDto.cs 58.33% 15 Missing ⚠️
...ion/InviteOrganizationUsersAuthorizationHandler.cs 84.69% 8 Missing and 7 partials ⚠️
...itwarden_license/src/Scim/Users/PostUserCommand.cs 56.66% 11 Missing and 2 partials ⚠️
...minConsole/Public/Controllers/MembersController.cs 35.00% 12 Missing and 1 partial ⚠️
... and 11 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5394      +/-   ##
==========================================
- Coverage   44.37%   44.21%   -0.16%     
==========================================
  Files        1487     1518      +31     
  Lines       68595    69935    +1340     
  Branches     6179     6319     +140     
==========================================
+ Hits        30438    30924     +486     
- Misses      36838    37667     +829     
- Partials     1319     1344      +25     

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

Copy link
Contributor

github-actions bot commented Feb 11, 2025

Logo
Checkmarx One – Scan Summary & Detailsca7bfdb4-2081-4b5c-a416-8382f44a66a0

New Issues (28)

Checkmarx found the following issues in this Pull Request

Severity Issue Source File / Package Checkmarx Insight
MEDIUM CSRF /bitwarden_license/src/Scim/Controllers/v2/UsersController.cs: 74
detailsMethod Post at line 74 of /bitwarden_license/src/Scim/Controllers/v2/UsersController.cs gets a parameter from a user request from Post. This parame...
Attack Vector
MEDIUM CSRF /src/Api/AdminConsole/Public/Controllers/MembersController.cs: 152
detailsMethod Post at line 152 of /src/Api/AdminConsole/Public/Controllers/MembersController.cs gets a parameter from a user request from Post. This param...
Attack Vector
MEDIUM Privacy_Violation /src/Core/AdminConsole/OrganizationFeatures/OrganizationUsers/InviteOrganizationUsersCommand.cs: 36
detailsMethod InviteOrganizationUserListAsync at line 36 of /src/Core/AdminConsole/OrganizationFeatures/OrganizationUsers/InviteOrganizationUsersCommand.c...
Attack Vector
LOW Heap_Inspection /src/Core/AdminConsole/Services/Implementations/RabbitMqEventListenerBase.cs: 29
detailsMethod RabbitMqEventListenerBase at line 29 of /src/Core/AdminConsole/Services/Implementations/RabbitMqEventListenerBase.cs defines Password, which...
Attack Vector
LOW Log_Forging /src/Api/Billing/Controllers/OrganizationBillingController.cs: 238
detailsMethod UpdateTaxInformationAsync at line 238 of /src/Api/Billing/Controllers/OrganizationBillingController.cs gets user input from element requestB...
Attack Vector
LOW Log_Forging /src/Api/Billing/Controllers/OrganizationBillingController.cs: 238
detailsMethod UpdateTaxInformationAsync at line 238 of /src/Api/Billing/Controllers/OrganizationBillingController.cs gets user input from element requestB...
Attack Vector
LOW Log_Forging /src/Api/Billing/Controllers/OrganizationBillingController.cs: 238
detailsMethod UpdateTaxInformationAsync at line 238 of /src/Api/Billing/Controllers/OrganizationBillingController.cs gets user input from element requestB...
Attack Vector
LOW Log_Forging /src/Api/Billing/Controllers/ProviderBillingController.cs: 104
detailsMethod UpdateTaxInformationAsync at line 104 of /src/Api/Billing/Controllers/ProviderBillingController.cs gets user input from element requestBody....
Attack Vector
LOW Log_Forging /src/Api/Billing/Controllers/ProviderBillingController.cs: 104
detailsMethod UpdateTaxInformationAsync at line 104 of /src/Api/Billing/Controllers/ProviderBillingController.cs gets user input from element requestBody....
Attack Vector
LOW Log_Forging /src/Api/Billing/Controllers/OrganizationBillingController.cs: 163
detailsMethod UpdatePaymentMethodAsync at line 163 of /src/Api/Billing/Controllers/OrganizationBillingController.cs gets user input from element requestBo...
Attack Vector
LOW Log_Forging /src/Api/Billing/Controllers/OrganizationBillingController.cs: 163
detailsMethod UpdatePaymentMethodAsync at line 163 of /src/Api/Billing/Controllers/OrganizationBillingController.cs gets user input from element requestBo...
Attack Vector
LOW Log_Forging /src/Api/Billing/Controllers/ProviderBillingController.cs: 104
detailsMethod UpdateTaxInformationAsync at line 104 of /src/Api/Billing/Controllers/ProviderBillingController.cs gets user input from element requestBody....
Attack Vector
LOW Log_Forging /src/Api/Billing/Controllers/OrganizationBillingController.cs: 163
detailsMethod UpdatePaymentMethodAsync at line 163 of /src/Api/Billing/Controllers/OrganizationBillingController.cs gets user input from element requestBo...
Attack Vector
LOW Log_Forging /src/Api/Billing/Controllers/OrganizationBillingController.cs: 163
detailsMethod UpdatePaymentMethodAsync at line 163 of /src/Api/Billing/Controllers/OrganizationBillingController.cs gets user input from element requestBo...
Attack Vector
LOW Unsafe_Use_Of_Target_blank /src/Core/MailTemplates/Handlebars/Layouts/FullUpdated.html.hbs: 186
detailsUsing at line 186 of /src/Core/MailTemplates/Handlebars/Layouts/FullUpdated.html.hbs...
Attack Vector
LOW Unsafe_Use_Of_Target_blank /src/Core/MailTemplates/Handlebars/Layouts/FullUpdated.html.hbs: 185
detailsUsing at line 185 of /src/Core/MailTemplates/Handlebars/Layouts/FullUpdated...
Attack Vector
LOW Unsafe_Use_Of_Target_blank /src/Core/MailTemplates/Handlebars/Layouts/FullUpdated.html.hbs: 184
detailsUsing at line 184 of /src/Core/MailTemplates/Handlebars/Layouts...
Attack Vector
LOW Unsafe_Use_Of_Target_blank /src/Core/MailTemplates/Handlebars/Layouts/FullUpdated.html.hbs: 183
detailsUsing at line 183 of /src/Core/MailTemplates/Handlebars/Layouts/FullUpdated.html.hbs, witho...
Attack Vector
LOW Unsafe_Use_Of_Target_blank /src/Core/MailTemplates/Handlebars/Layouts/FullUpdated.html.hbs: 182
detailsUsing at line 182 of /src/Core/MailTemplates/Handlebars/Layouts/FullUpdated.html.hbs, w...
Attack Vector
LOW Unsafe_Use_Of_Target_blank /src/Core/MailTemplates/Handlebars/Layouts/FullUpdated.html.hbs: 181
detailsUsing at line 181 of /src/Core/MailTemplates/Handlebars/Layouts/FullUpdated.html.hbs...
Attack Vector
LOW Unsafe_Use_Of_Target_blank /src/Core/MailTemplates/Handlebars/Layouts/FullUpdated.html.hbs: 180
detailsUsing at line 180 of /src/Core/MailTemplates/Handlebars/Layouts/FullUpdated.html.hbs, with...
Attack Vector
LOW Unsafe_Use_Of_Target_blank /src/Core/MailTemplates/Handlebars/Layouts/Full.html.hbs: 157
detailsUsing at line 157 of /src/Core/MailTemplates/Handlebars/Layouts/Full.html.hbs, witho...
Attack Vector
LOW Unsafe_Use_Of_Target_blank /src/Core/MailTemplates/Handlebars/Layouts/Full.html.hbs: 156
detailsUsing at line 156 of /src/Core/MailTemplates/Handlebars/Layouts/Full.html.h...
Attack Vector
LOW Unsafe_Use_Of_Target_blank /src/Core/MailTemplates/Handlebars/Layouts/Full.html.hbs: 155
detailsUsing at line 155 of /src/Core/MailTemplates/Handlebars/Layouts...
Attack Vector
LOW Unsafe_Use_Of_Target_blank /src/Core/MailTemplates/Handlebars/Layouts/Full.html.hbs: 154
detailsUsing at line 154 of /src/Core/MailTemplates/Handlebars/Layouts/Full.html.hbs, without corr...
Attack Vector
LOW Unsafe_Use_Of_Target_blank /src/Core/MailTemplates/Handlebars/Layouts/Full.html.hbs: 153
detailsUsing at line 153 of /src/Core/MailTemplates/Handlebars/Layouts/Full.html.hbs, without ...
Attack Vector
LOW Unsafe_Use_Of_Target_blank /src/Core/MailTemplates/Handlebars/Layouts/Full.html.hbs: 152
detailsUsing at line 152 of /src/Core/MailTemplates/Handlebars/Layouts/Full.html.hbs, witho...
Attack Vector
LOW Unsafe_Use_Of_Target_blank /src/Core/MailTemplates/Handlebars/Layouts/Full.html.hbs: 151
detailsUsing at line 151 of /src/Core/MailTemplates/Handlebars/Layouts/Full.html.hbs, without cor...
Attack Vector
Fixed Issues (26)

Great job! The following issues were fixed in this Pull Request

Severity Issue Source File / Package
MEDIUM SSRF /src/Billing/Controllers/FreshdeskController.cs: 149
MEDIUM SSRF /src/Billing/Controllers/FreshdeskController.cs: 149
LOW Heap_Inspection /src/Core/AdminConsole/Services/Implementations/RabbitMqEventListenerService.cs: 29
LOW Log_Forging /src/Billing/Controllers/FreshdeskController.cs: 149
LOW Log_Forging /src/Billing/Controllers/FreshdeskController.cs: 149
LOW Log_Forging /src/Billing/Controllers/FreshdeskController.cs: 149
LOW Log_Forging /src/Billing/Controllers/StripeController.cs: 164
LOW Log_Forging /src/Billing/Controllers/RecoveryController.cs: 38
LOW Log_Forging /src/Billing/Controllers/StripeController.cs: 164
LOW Log_Forging /src/Billing/Controllers/RecoveryController.cs: 38
LOW Log_Forging /src/Billing/Controllers/StripeController.cs: 164
LOW Log_Forging /src/Billing/Controllers/RecoveryController.cs: 38
LOW Unsafe_Use_Of_Target_blank /src/Core/MailTemplates/Handlebars/Layouts/FullUpdated.html.hbs: 186
LOW Unsafe_Use_Of_Target_blank /src/Core/MailTemplates/Handlebars/Layouts/FullUpdated.html.hbs: 185
LOW Unsafe_Use_Of_Target_blank /src/Core/MailTemplates/Handlebars/Layouts/FullUpdated.html.hbs: 184
LOW Unsafe_Use_Of_Target_blank /src/Core/MailTemplates/Handlebars/Layouts/FullUpdated.html.hbs: 183
LOW Unsafe_Use_Of_Target_blank /src/Core/MailTemplates/Handlebars/Layouts/FullUpdated.html.hbs: 182
LOW Unsafe_Use_Of_Target_blank /src/Core/MailTemplates/Handlebars/Layouts/FullUpdated.html.hbs: 181
LOW Unsafe_Use_Of_Target_blank /src/Core/MailTemplates/Handlebars/Layouts/FullUpdated.html.hbs: 180
LOW Unsafe_Use_Of_Target_blank /src/Core/MailTemplates/Handlebars/Layouts/Full.html.hbs: 157
LOW Unsafe_Use_Of_Target_blank /src/Core/MailTemplates/Handlebars/Layouts/Full.html.hbs: 156
LOW Unsafe_Use_Of_Target_blank /src/Core/MailTemplates/Handlebars/Layouts/Full.html.hbs: 155
LOW Unsafe_Use_Of_Target_blank /src/Core/MailTemplates/Handlebars/Layouts/Full.html.hbs: 154
LOW Unsafe_Use_Of_Target_blank /src/Core/MailTemplates/Handlebars/Layouts/Full.html.hbs: 153
LOW Unsafe_Use_Of_Target_blank /src/Core/MailTemplates/Handlebars/Layouts/Full.html.hbs: 152
LOW Unsafe_Use_Of_Target_blank /src/Core/MailTemplates/Handlebars/Layouts/Full.html.hbs: 151

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant