Skip to content

Add SMTP Mail Tests #5597

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

Merged
merged 4 commits into from
Apr 3, 2025
Merged

Add SMTP Mail Tests #5597

merged 4 commits into from
Apr 3, 2025

Conversation

justindbaur
Copy link
Member

🎟️ Tracking

📔 Objective

We are going to be adding functionality to allow the adding a certificates to the trust store without going through update-ca-certificates to support non-root scenarios. SMTP is one of the areas that needs consideration. While working on those changes @tangowithfoxtrot and I started on some tests and these are the result of that. The new functionality and at least one new test will be added in a later PR.

📸 Screenshots

⏰ 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

Co-authored-by: tangowithfoxtrot <[email protected]>
Copy link
Contributor

github-actions bot commented Apr 3, 2025

Logo
Checkmarx One – Scan Summary & Details38b0b92f-054c-448e-86b3-4cd4e1ee525c

New Issues (1)

Checkmarx found the following issues in this Pull Request

Severity Issue Source File / Package Checkmarx Insight
MEDIUM SSL_Verification_Bypass /src/Core/Services/Implementations/MailKitSmtpMailDeliveryService.cs: 76
details/src/Core/Services/Implementations/MailKitSmtpMailDeliveryService.cs relies HTTPS requests, in SendEmailAsync. The ServerCertificateValidationCallb...
Attack Vector
Fixed Issues (7)

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

Severity Issue Source File / Package
MEDIUM CSRF /src/Api/AdminConsole/Controllers/GroupsController.cs: 164
MEDIUM CSRF /bitwarden_license/src/Scim/Controllers/v2/GroupsController.cs: 86
MEDIUM CSRF /src/Api/AdminConsole/Public/Controllers/GroupsController.cs: 133
MEDIUM CSRF /bitwarden_license/src/Scim/Controllers/v2/GroupsController.cs: 96
MEDIUM SSL_Verification_Bypass /src/Core/Services/Implementations/MailKitSmtpMailDeliveryService.cs: 73
MEDIUM SSL_Verification_Bypass /src/Core/Services/Implementations/MailKitSmtpMailDeliveryService.cs: 73
MEDIUM SSL_Verification_Bypass /src/Core/Services/Implementations/MailKitSmtpMailDeliveryService.cs: 73

Copy link

codecov bot commented Apr 3, 2025

Codecov Report

Attention: Patch coverage is 65.00000% with 7 lines in your changes missing coverage. Please review.

Project coverage is 45.05%. Comparing base (7b2b62e) to head (b2b98d8).
Report is 11 commits behind head on main.

Files with missing lines Patch % Lines
.../Implementations/MailKitSmtpMailDeliveryService.cs 65.00% 7 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5597      +/-   ##
==========================================
+ Coverage   44.99%   45.05%   +0.06%     
==========================================
  Files        1562     1563       +1     
  Lines       71493    71605     +112     
  Branches     6403     6407       +4     
==========================================
+ Hits        32168    32262      +94     
- Misses      37959    37973      +14     
- Partials     1366     1370       +4     

☔ 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.

@justindbaur justindbaur marked this pull request as ready for review April 3, 2025 12:28
@justindbaur justindbaur requested review from a team and dani-garcia April 3, 2025 12:28
Copy link

sonarqubecloud bot commented Apr 3, 2025

@justindbaur justindbaur merged commit 559101d into main Apr 3, 2025
54 checks passed
@justindbaur justindbaur deleted the smtp-mail-tests branch April 3, 2025 16:59
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.

2 participants