Skip to content

Conversation

@rr-bw
Copy link
Contributor

@rr-bw rr-bw commented May 28, 2025

🎟️ Tracking

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

📔 Objective

Adds a null check so that:

  • For a Grantor who is an org Owner, we respond with a 200 and the policies
  • For a Grantor is not an org Owner, we respond with a 200 and null

📸 Screenshots

Screencast shows:

  1. For a Grantor who is an org Owner, getting a 200 response with the policies
  2. For a Grantor is not an org Owner, getting a 200 response with null
fix.mov

⏰ 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

@github-actions
Copy link
Contributor

github-actions bot commented May 28, 2025

Logo
Checkmarx One – Scan Summary & Details19c037f9-fc3e-4a39-bfb7-6d323183e494

New Issues (6)

Checkmarx found the following issues in this Pull Request

Severity Issue Source File / Package Checkmarx Insight
HIGH Path_Traversal /src/Api/Tools/Controllers/SendsController.cs: 211
detailsMethod PostFile at line 211 of /src/Api/Tools/Controllers/SendsController.cs gets dynamic data from the model element. This element’s value then ...
ID: keY0wh5knH3DnvbREmfJIGGig2k%3D
Attack Vector
HIGH Path_Traversal /src/Api/Tools/Controllers/SendsController.cs: 211
detailsMethod PostFile at line 211 of /src/Api/Tools/Controllers/SendsController.cs gets dynamic data from the model element. This element’s value then ...
ID: 4QIsZ8agHxuL%2BFjdf49NpZJHsvU%3D
Attack Vector
HIGH Path_Traversal /src/Api/Tools/Controllers/SendsController.cs: 211
detailsMethod PostFile at line 211 of /src/Api/Tools/Controllers/SendsController.cs gets dynamic data from the model element. This element’s value then ...
ID: Uwek2GQ3fAsDgtQkgYKs2Vkocog%3D
Attack Vector
HIGH Path_Traversal /src/Api/Tools/Controllers/SendsController.cs: 211
detailsMethod PostFile at line 211 of /src/Api/Tools/Controllers/SendsController.cs gets dynamic data from the model element. This element’s value then ...
ID: OxfkMdVQRO3StOFifYOfb36o2%2Bw%3D
Attack Vector
HIGH Path_Traversal /src/Api/Tools/Controllers/SendsController.cs: 211
detailsMethod PostFile at line 211 of /src/Api/Tools/Controllers/SendsController.cs gets dynamic data from the model element. This element’s value then ...
ID: HvNxhQLOT4P0U2Lbp6HqePXg%2FNQ%3D
Attack Vector
MEDIUM CSRF /src/Api/AdminConsole/Controllers/GroupsController.cs: 164
detailsMethod Put at line 164 of /src/Api/AdminConsole/Controllers/GroupsController.cs gets a parameter from a user request from model. This parameter v...
ID: yt2PajNvte2IY7Xe%2FRtOPf8qKlo%3D
Attack Vector

@codecov
Copy link

codecov bot commented May 28, 2025

Codecov Report

Attention: Patch coverage is 0% with 1 line in your changes missing coverage. Please review.

Project coverage is 47.72%. Comparing base (2af4e9c) to head (001d790).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
.../Api/Auth/Controllers/EmergencyAccessController.cs 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##             main    #5886       +/-   ##
===========================================
+ Coverage   11.12%   47.72%   +36.59%     
===========================================
  Files         994     1692      +698     
  Lines       43786    74972    +31186     
  Branches     3464     6758     +3294     
===========================================
+ Hits         4870    35777    +30907     
+ Misses      38820    37739     -1081     
- Partials       96     1456     +1360     

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

@rr-bw rr-bw closed this Jun 12, 2025
@rr-bw rr-bw reopened this Jun 12, 2025
@sonarqubecloud
Copy link

@rr-bw rr-bw merged commit 0f12d07 into main Jun 25, 2025
39 checks passed
@rr-bw rr-bw deleted the auth/pm-21921/fix-get-grantor-policies-bug branch June 25, 2025 16:30
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.

3 participants