Skip to content

fix(webauthn): include backup flag check in registration - #748

Merged
james-d-elliott merged 1 commit into
masterfrom
fix-be-bs
Aug 12, 2026
Merged

fix(webauthn): include backup flag check in registration#748
james-d-elliott merged 1 commit into
masterfrom
fix-be-bs

Conversation

@james-d-elliott

Copy link
Copy Markdown
Member

This includes the check in §7.1 to the registration handler.

This includes the check in §7.1 to the registration handler.
@james-d-elliott
james-d-elliott requested a review from a team as a code owner August 12, 2026 09:51
@james-d-elliott
james-d-elliott merged commit 26a4868 into master Aug 12, 2026
7 of 8 checks passed
@james-d-elliott
james-d-elliott deleted the fix-be-bs branch August 12, 2026 09:51
@coderabbitai

coderabbitai Bot commented Aug 12, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 6067ceb8-a988-4325-8b6b-e8627a16cfca

📥 Commits

Reviewing files that changed from the base of the PR and between 0661c81 and a31e321.

📒 Files selected for processing (2)
  • webauthn/registration.go
  • webauthn/registration_test.go

Walkthrough

CreateCredential now rejects registration responses with Backup State set while Backup Eligible is unset. Tests add configurable authenticator flags and verify the invalid combination returns the expected validation error.

Changes

Backup flag validation

Layer / File(s) Summary
Registration validation and test coverage
webauthn/registration.go, webauthn/registration_test.go
CreateCredential rejects invalid backup flag combinations. Registration tests modify authenticator flags and verify that no credential is returned with the expected error.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

Poem

A rabbit checked the flags in flight,
“Backup State needs eligibility right.”
Tests changed the bytes with care,
Invalid credentials stop there.
Hop, hop—validation is bright!

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix-be-bs

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@codecov

codecov Bot commented Aug 12, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.24%. Comparing base (0661c81) to head (a31e321).
⚠️ Report is 2 commits behind head on master.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #748   +/-   ##
=======================================
  Coverage   88.24%   88.24%           
=======================================
  Files          57       57           
  Lines        5853     5855    +2     
=======================================
+ Hits         5165     5167    +2     
  Misses        417      417           
  Partials      271      271           
Files with missing lines Coverage Δ
webauthn/registration.go 96.36% <100.00%> (+0.06%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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