-
Notifications
You must be signed in to change notification settings - Fork 1.5k
[PM-26177] Allow mobile clients to create passkeys #6383
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
base: main
Are you sure you want to change the base?
Conversation
|
|
Great job! No new security vulnerabilities introduced in this pull request |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #6383 +/- ##
===========================================
+ Coverage 13.02% 50.63% +37.61%
===========================================
Files 1112 1864 +752
Lines 49293 82552 +33259
Branches 3820 7290 +3470
===========================================
+ Hits 6420 41800 +35380
+ Misses 42754 39156 -3598
- Partials 119 1596 +1477 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
610d18e to
1589f3e
Compare
|
Claude finished @iinuwa's task —— View job Code Review CompleteSummary of ChangesThis PR modifies authorization policies on the
❌ Critical Issues1. CSRF Vulnerability in Newly Opened Endpoints (src/Api/Auth/Controllers/WebAuthnController.cs)The endpoints Issue: These state-changing POST/PUT endpoints now accept requests from non-web clients without traditional CSRF protection. While the API likely uses Bearer token authentication (which has some CSRF resistance), the Checkmarx scanner flagged a CSRF concern at line 259. Impact:
Recommendation: // Consider adding additional verification for state-changing operations:
// 1. For AttestationOptions - ✅ Already has SecretVerificationRequestModel
// 2. For Post (line 109) - Consider requiring re-authentication or rate limiting
// 3. For UpdateCredential (line 155) - ✅ Uses assertion challenge which acts as CSRF protectionThe Reference: src/Api/Auth/Controllers/WebAuthnController.cs:109-127 2. Missing Unit Tests for Authorization ChangesIssue: The PR changes authorization policies from Current Test Gap:
Recommendation: Add authorization tests: [Theory, BitAutoData]
public async Task AttestationOptions_WithApplicationPolicy_Succeeds(...)
{
// Verify mobile clients can access AttestationOptions
}
[Theory, BitAutoData]
public async Task AssertionOptions_WithApplicationPolicy_Fails(...)
{
// Verify mobile clients CANNOT access AssertionOptions (should stay Web-only)
}
|




🎟️ Tracking
PM-26177
PM-27177
PM-27265
PM-27264
📔 Objective
As part of the initiative to have unphishable onboarding from mobile clients to the web vault or browser extension, we need to allow mobile clients to be able to create new passkeys.
This PR allows mobile clients to create and update passkeys. At this time, we are not expecting mobile clients to authenticate directly with passkeys, so the assertion endpoint was left restricted to the web vault.
⏰ Reminders before review
🦮 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