Skip to content
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

PM-4877: Only allow replacing passkeys for the same userhandle #9804

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

abergs
Copy link
Member

@abergs abergs commented Jun 24, 2024

๐ŸŽŸ๏ธ Tracking

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

๐Ÿ“” Objective

๐Ÿ“ธ Screenshots

Demo after these changes:
https://share.cleanshot.com/8j29tzPK

Demo before these changes:
https://share.cleanshot.com/xfLJ11Hd

โฐ 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 github-actions bot added the needs-qa Marks a PR as requiring QA approval label Jun 24, 2024
Copy link
Contributor

github-actions bot commented Jun 24, 2024

Logo
Checkmarx One โ€“ Scan Summary & Details โ€“ 6d83db3f-2053-440f-8c02-0c7b57a0de7a

New Issues

Severity Issue Source File / Package Checkmarx Insight
MEDIUM Angular_Improper_Type_Pipe_Usage /bitwarden_license/bit-web/src/app/admin-console/providers/providers-layout.component.html: 50 Attack Vector
MEDIUM Unpinned Actions Full Length Commit SHA /build-desktop.yml: 1210 Pinning an action to a full length commit SHA is currently the only way to use an action as an immutable release. Pinning to a particular SHA helps...
MEDIUM Unpinned Actions Full Length Commit SHA /build-cli.yml: 406 Pinning an action to a full length commit SHA is currently the only way to use an action as an immutable release. Pinning to a particular SHA helps...
MEDIUM Unpinned Actions Full Length Commit SHA /build-desktop.yml: 1256 Pinning an action to a full length commit SHA is currently the only way to use an action as an immutable release. Pinning to a particular SHA helps...
LOW Client_DOM_Open_Redirect /apps/browser/src/platform/popup/layout/popup-header.component.ts: 29 Attack Vector
LOW Client_Use_Of_Iframe_Without_Sandbox /apps/web/src/connectors/duo.ts: 8 Attack Vector

Fixed Issues

Severity Issue Source File / Package
MEDIUM Unpinned Actions Full Length Commit SHA /build-cli.yml: 402
MEDIUM Unpinned Actions Full Length Commit SHA /build-desktop.yml: 1268
MEDIUM Unpinned Actions Full Length Commit SHA /build-desktop.yml: 1222
LOW Unsafe_Use_Of_Target_blank /apps/web/src/app/auth/settings/two-factor-authenticator.component.html: 58
LOW Unsafe_Use_Of_Target_blank /apps/web/src/app/auth/settings/two-factor-authenticator.component.html: 45

@abergs abergs marked this pull request as ready for review June 25, 2024 10:37
@abergs abergs requested review from a team as code owners June 25, 2024 10:37
Copy link
Contributor

@coroiu coroiu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tests failing?

@abergs
Copy link
Member Author

abergs commented Jun 25, 2024

@coroiu Ah, I ran the tests locally but mistakenly only ran those in the /apps/browser folder. I've now fixed the failing platform test, but in github I get this error which I don't understand.

CleanShot 2024-06-25 at 14 58 23@2x

@coroiu
Copy link
Contributor

coroiu commented Jun 25, 2024

@abergs seems like someone broke main, fix was pushed 7 minutes ago, just update your branch #9822 :)

Edit: seems you beat me to it!

Copy link

codecov bot commented Jun 25, 2024

Codecov Report

Attention: Patch coverage is 0% with 6 lines in your changes missing coverage. Please review.

Project coverage is 29.53%. Comparing base (1fdfd69) to head (f4e5585).
Report is 46 commits behind head on main.

Files Patch % Lines
...rc/vault/popup/components/fido2/fido2.component.ts 0.00% 6 Missing โš ๏ธ
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #9804      +/-   ##
==========================================
+ Coverage   29.30%   29.53%   +0.22%     
==========================================
  Files        2532     2537       +5     
  Lines       73825    74158     +333     
  Branches    13783    13857      +74     
==========================================
+ Hits        21636    21903     +267     
- Misses      50569    50596      +27     
- Partials     1620     1659      +39     

โ˜” View full report in Codecov by Sentry.
๐Ÿ“ข Have feedback on the report? Share it here.

@abergs
Copy link
Member Author

abergs commented Jun 25, 2024

How did a rebase trigger all of that crap. Sorry everyone that got pinged.

@abergs abergs removed the request for review from a team June 25, 2024 13:17
@abergs abergs removed request for a team, Jingo88, rr-bw and eliykat June 25, 2024 13:17
@abergs
Copy link
Member Author

abergs commented Jun 25, 2024

@coroiu Tests passing

@coroiu coroiu self-requested a review June 25, 2024 14:05
coroiu
coroiu previously approved these changes Jun 26, 2024
gbubemismith
gbubemismith previously approved these changes Jun 27, 2024
Copy link
Member

@gbubemismith gbubemismith left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Thanks for working on this @abergs

@gbubemismith
Copy link
Member

I wonder why the mac os desktop build keeps failing

@abergs abergs dismissed stale reviews from gbubemismith and coroiu via f4e5585 June 29, 2024 08:05
@abergs abergs requested a review from gbubemismith June 29, 2024 08:11
* @param userHandle
*/
private hasNoOtherPasskeys(cipher: CipherView, userHandle: string): boolean {
if (cipher.login.fido2Credentials == null || cipher.login.fido2Credentials.length === 0) {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need re-review because I was using === null which caused an error. Thanks to @justindbaur who told me to fix that in another PR i knew right away what to do!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-qa Marks a PR as requiring QA approval
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants