Skip to content

The agent that grows with you

fix: skip Bitwarden URIs marked match=Never when collecting fill origins

teknium18a2996503a76
diff --git a/agent/vault_backends/bitwarden.py b/agent/vault_backends/bitwarden.py
index 1b8755a8add..d249f8f323b 100644
--- a/agent/vault_backends/bitwarden.py
+++ b/agent/vault_backends/bitwarden.py
@@ -96,6 +96,8 @@ class BitwardenLoginBackend(LoginBackend):
login = item["login"]
origins: List[str] = []
for uri in login.get("uris") or []:
+ if uri.get("match") == 5: # Bitwarden URI match "Never": not a fill target
+ continue
try:
origin = normalize_origin(str(uri.get("uri") or ""))
except Exception:
diff --git a/tests/agent/test_vault_backends.py b/tests/agent/test_vault_backends.py
index 3c88dac4980..74c06cad075 100644
--- a/tests/agent/test_vault_backends.py
+++ b/tests/agent/test_vault_backends.py
@@ -172,7 +172,7 @@ def test_lock_during_unlock_wins_and_only_the_owning_session_release_drops_a_tok
def test_bitwarden_multi_uri_item_binds_every_saved_web_origin():
"""A Bitwarden login with several URIs binds all of them (deduped, first stays
- primary); non-web URIs never widen the fill set."""
+ primary); non-web URIs and URIs marked match=Never (5) never widen the fill set."""
backend = BitwardenLoginBackend({"enabled": True})
items_json = json.dumps([{
"id": "multi", "type": 1, "name": "Amazon", "creationDate": "2026-01-01T00:00:00Z",
@@ -182,6 +182,7 @@ def test_bitwarden_multi_uri_item_binds_every_saved_web_origin():
{"uri": "https://eu.account.amazon.com"},
{"uri": "androidapp://com.amazon.shopping"},
{"uri": "not a url"},
+ {"uri": "https://never.amazon.co.uk", "match": 5},
]},
}])
with patch.object(BitwardenLoginBackend, "is_unlocked", return_value=True), \