server icon indicating copy to clipboard operation
server copied to clipboard

[PM-21918] update send api models to support new `email` field

Open audreyality opened this issue 7 months ago â€ĸ 7 comments

đŸŽŸī¸ Tracking

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

Implements #5895

📔 Objective

Update send API models to support email/OTP administration.

[!IMPORTANT] This PR includes documentation for the related models. I mostly inferred what each of these are. Please focus on them during review to confirm that the comments are correct.

⏰ 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

audreyality avatar May 28 '25 18:05 audreyality

📝 This PR may wait to merge until the CLI logic is stable.

audreyality avatar May 28 '25 18:05 audreyality

Logo Checkmarx One – Scan Summary & Details – 38cebc47-7ea2-4eef-b8b5-7179bcfeee26

New Issues (3)

Checkmarx found the following issues in this Pull Request

Severity Issue Source File / Package Checkmarx Insight
MEDIUM CSRF /src/Api/Auth/Controllers/AccountsController.cs: 419
detailsMethod at line 419 of /src/Api/Auth/Controllers/AccountsController.cs gets a parameter from a user request from model. This parameter value flow...
ID: XWl46lV2X%2BBt49nNe5GE3VUr%2Fy0%3D
Attack Vector
MEDIUM CSRF /src/Api/Vault/Controllers/CiphersController.cs: 1508
detailsMethod at line 1508 of /src/Api/Vault/Controllers/CiphersController.cs gets a parameter from a user request from id. This parameter value flows ...
ID: Tk%2FmvJPGUHNjl6cjrFHos7YAa1M%3D
Attack Vector
MEDIUM CSRF /src/Api/Vault/Controllers/CiphersController.cs: 1389
detailsMethod at line 1389 of /src/Api/Vault/Controllers/CiphersController.cs gets a parameter from a user request from id. This parameter value flows ...
ID: KKbwt1aUy7U49Pl7Stx2veFr%2FSU%3D
Attack Vector
Fixed Issues (3)

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

Severity Issue Source File / Package
MEDIUM ~~CSRF~~ /src/Api/Controllers/CollectionsController.cs: 176
MEDIUM ~~CSRF~~ /src/Api/KeyManagement/Controllers/AccountsKeyManagementController.cs: 97
MEDIUM ~~CSRF~~ /src/Api/Vault/Controllers/CiphersController.cs: 299

github-actions[bot] avatar May 28 '25 18:05 github-actions[bot]

Codecov Report

:x: Patch coverage is 74.07407% with 14 lines in your changes missing coverage. Please review. :white_check_mark: Project coverage is 49.43%. Comparing base (236027f) to head (fb27708). :warning: Report is 7 commits behind head on main.

Files with missing lines Patch % Lines
src/Api/Tools/Models/Request/SendRequestModel.cs 33.33% 5 Missing and 1 partial :warning:
src/Api/Tools/Controllers/SendsController.cs 64.28% 5 Missing :warning:
.../Core/Tools/SendFeatures/Queries/SendOwnerQuery.cs 88.88% 0 Missing and 3 partials :warning:
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5895      +/-   ##
==========================================
+ Coverage   49.27%   49.43%   +0.15%     
==========================================
  Files        1770     1778       +8     
  Lines       78536    78724     +188     
  Branches     6993     7009      +16     
==========================================
+ Hits        38696    38914     +218     
+ Misses      38323    38288      -35     
- Partials     1517     1522       +5     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

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

codecov[bot] avatar May 28 '25 18:05 codecov[bot]

Moving this back to draft because the server requirements have changed.

audreyality avatar Jul 28 '25 18:07 audreyality