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

fix bitwarden credential search #932

Merged
merged 1 commit into from
Oct 8, 2024

Conversation

LawyZheng
Copy link
Collaborator

@LawyZheng LawyZheng commented Oct 8, 2024

Important

Fixes Bitwarden credential search by refining domain extraction and credential filtering logic in _get_secret_value_from_url.

  • Behavior:
    • Fixes domain extraction in _get_secret_value_from_url by using extract_url.domain instead of registered_domain.
    • Refines credential selection logic to match valid email usernames and registered domains.
  • Models:
    • Introduces BitwardenQueryResult model to encapsulate credentials and URIs.
  • Functions:
    • Updates _get_secret_value_from_url to use BitwardenQueryResult for processing credentials and URIs.

This description was created by Ellipsis for 0448a74. It will automatically update as commits are pushed.

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot 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 to me! Reviewed everything up to 0448a74 in 53 seconds

More details
  • Looked at 93 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 3 drafted comments based on config settings.
1. skyvern/forge/sdk/services/bitwarden.py:168
  • Draft comment:
    The change from registered_domain to domain might lead to incorrect search results if the domain is not unique across different TLDs. Consider reverting to registered_domain for more accurate searches.
  • Reason this comment was not posted:
    Decided after close inspection that this draft comment was likely wrong and/or not actionable:
    The comment points out a potential issue with the change from registered_domain to domain. This could indeed lead to incorrect search results if the same domain exists under different TLDs. The comment is directly related to the change made in the diff, and it highlights a potential flaw in the logic that could affect the functionality.
    The comment is speculative, as it suggests a potential issue without confirming it. However, it does highlight a logical concern that could lead to incorrect behavior, which is relevant to the change made.
    While the comment is speculative, it is based on a logical concern that could lead to incorrect behavior. This makes it relevant and potentially useful for the author to consider.
    The comment should be kept as it highlights a potential issue with the change from registered_domain to domain, which could lead to incorrect search results.
2. skyvern/forge/sdk/services/bitwarden.py:167
  • Draft comment:
    Ensure that the tldextract library is correctly installed and updated, as it is crucial for domain extraction. Consider adding error handling for cases where domain extraction might fail.
  • Reason this comment was not posted:
    Confidence changes required: 50%
    The code uses tldextract to extract domains from URLs. However, the tldextract library might not always be available or might not handle all edge cases correctly. It's important to ensure that the library is correctly installed and updated.
3. skyvern/forge/sdk/services/bitwarden.py:224
  • Draft comment:
    asyncio.timeout is only available in Python 3.11 and later. Ensure compatibility with earlier Python versions if needed.
  • Reason this comment was not posted:
    Comment did not seem useful.

Workflow ID: wflow_yHMbeGkAoK4jbXk0


You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

@LawyZheng LawyZheng merged commit 18cebb2 into main Oct 8, 2024
2 checks passed
@LawyZheng LawyZheng deleted the lawy/fix-bitwarden-crendential-search branch October 8, 2024 18:38
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