blindfill 0.0.0 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,90 @@
1
+ <div align="center">
2
+
3
+ # blindfill
4
+
5
+ **讓 AI 代理登入網站,卻永遠看不到密碼。**
6
+
7
+ **[網站:mics8128.github.io/blindfill](https://mics8128.github.io/blindfill/)**
8
+
9
+ [![CI](https://github.com/mics8128/blindfill/actions/workflows/ci.yml/badge.svg)](https://github.com/mics8128/blindfill/actions/workflows/ci.yml)
10
+ [![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
11
+ [![Node >=20](https://img.shields.io/badge/node-%3E%3D20-339933.svg)](package.json)
12
+ [![Status: alpha](https://img.shields.io/badge/status-alpha-orange.svg)](SECURITY.md)
13
+ [![MCP server](https://img.shields.io/badge/MCP-server-8A2BE2.svg)](examples/mcp-config.json)
14
+
15
+ [English](README.md) · **繁體中文** · [简体中文](README.zh-CN.md) · [日本語](README.ja.md) · [한국어](README.ko.md)
16
+
17
+ </div>
18
+
19
+ 讓 AI 代理登入網站,**卻永遠看不到密碼**。blindfill 會從你的密碼管理器讀取憑證,確認它綁定於該頁面的來源(origin),再將其輸入真實的表單,並且只回傳頁面結構與執行結果。機密值是唯寫的(`SecretHandle.into(sink)`),輸出時會被清除(scrub),且填寫完成後工作階段(session)即鎖定。
20
+
21
+ > **狀態:alpha(0.1.0)。** 請先閱讀 [SECURITY.md](SECURITY.md),了解威脅模型與已知缺口。
22
+
23
+ ## 範例:密碼不經過 LLM
24
+
25
+ 以下輸出僅為示意,欄位名稱可能略有不同。
26
+
27
+ 1. **登入。** agent 帶項目 ID 和登入網址呼叫 `fill`。blindfill 從 `bw` 取出密碼,直接輸入表單,只回傳 `{"ok": true, "url": ".../home"}`。模型只看到結果,看不到密碼。
28
+ 2. **釣魚與提示注入。** 仿冒網域(`examp1e.com`)或跨網域 iframe 會在**讀取任何機密之前**就被拒絕,惡意網頁無法誘使 agent 把密碼輸入到別處。
29
+ 3. **一次性驗證碼。** `totp_code` 回傳目前的 6 位數驗證碼(可讀、可填入,與文字相同)。TOTP 種子永遠不離開後端。
30
+ 4. **填寫後鎖定。** 填寫後,工作階段會拒絕提供頁面文字、DOM 和截圖,頁面即使回顯密碼也無法洩漏給模型。
31
+
32
+ ## 支援的後端與瀏覽器
33
+
34
+ | 後端 | 等級 | 說明 |
35
+ | --------------------------------------------------------------------------------------------------- | ------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
36
+ | Bitwarden / Vaultwarden(`bw`) | 已驗證(模擬 CLI + 測試資料;真實 Vault 用於真實網站) | 2026-11-27:`tests/live-bw.test.ts` 對真實 Vaultwarden(Bitwarden CLI 2026.11.1)通過,用拋棄式項目與本機假網頁(密碼 + TOTP 填入、產生密碼 + 註冊)。2026-11-27/28:已用於真實網站(Walmart、eccang、Amazon Seller Central、iCHEF、QuickBooks Online、Wayfair、Fastmail、Google、Instagram、GitHub),失敗與部分完成的紀錄見 [docs/TESTED.md](docs/TESTED.md)。 |
37
+ | 1Password(`op`)、rbw、pass、gopass、KeePassXC(`keepassxc-cli`)、Secret Service(`secret-tool`) | 盲寫、未驗證 | 僅在測試資料上通過共用契約測試。歡迎執行 `blindfill backend selftest <id>` 並提交後端回報。 |
38
+
39
+ | 瀏覽器 | 狀態 |
40
+ | --------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
41
+ | Chromium:Playwright 內建、任何 Chromium 組建(`--executable`),或本機回環 CDP | 支援,已測試 |
42
+ | Firefox / Camoufox,透過本機回環 Playwright 伺服器(`--browser firefox-connect`) | 已測試(選用測試套件),版本為 Camoufox 158.0.1-beta.41 與 159.0-beta.43。有持久設定檔的伺服器(例如共用的 Camoufox)直接沿用:用它的 cookie 與登入狀態,`--url` 另開自己的分頁,既有分頁不會被導覽或關閉([docs/browsers.md](docs/browsers.md));已對長時間執行的實例做唯讀檢查 |
43
+ | Ego Lite | 支援:執行中的應用程式透過 `ego-cli`(`--endpoint ego://new`),或獨立、空白設定檔的實例(`--executable`)。使用 `ego-cli` 時,填入的值會經過 Ego 的 Node runtime;跨來源 iframe 與 Chromium 相同(frame 規則、同樣的檢查);不支援 passkey(Ego 接受 WebAuthn 指令,但網頁的請求沒有送到虛擬驗證器);送出後 Ego 的密碼管理員會執行 Google 的密碼外洩檢查。外送流量與 crash dump 只在 2026-11-28 檢查過一次(約 3 分鐘、假登入頁),未發現外洩;更長時間的流量與 Ego UI 操作紀錄未檢查,擁有者已接受。已在假網站跑過 e2e,真站登入待測([docs/browsers.md](docs/browsers.md#ego-lite)) |
44
+ | WebKit / Safari | 不支援 |
45
+ | Android(14 以上) | 輔助 APK:密碼走自動填入服務(登入,以及用 `item generate` 產生的密碼填註冊表單),密碼與 passkey 走 Credential Manager(登入,以及對綁定該 app、尚無 passkey 的項目只新增的 passkey 註冊;金鑰在主機端產生與使用);app 與 Bitwarden 一樣依套件名稱綁定,項目有 `blindfill.signers` 時也核對簽章;WebView 只依 https 網域綁定(見 SECURITY.md 21–23);正式簽章,每次填入前主機都會核對手機上輔助 APK 的簽章;以 `blindfill android install --serial <s>` 安裝([android/README.md](android/README.md));已用假 app 在一支手機(Xperia 5 II,Android 17)與模擬器(Android 16)測試:密碼、註冊表單、WebView 登入與註冊、Credential Manager 密碼、passkey 註冊後登入。同一支手機搭配真實 `bw` Vault 測真實 app(2026-11-27):Threads 登入成功;Instagram 部分完成(建議已填入,未確認登入結果) |
46
+ | Passkey | 網頁登入與註冊(只新增:任何綁定該網頁、尚無 passkey 的項目):Chromium,以及透過 Marionette 的 Firefox/Camoufox(`BLINDFILL_MARIONETTE`;Firefox 以 BE=0 簽署,檢查 BE 的網站可能拒絕 Bitwarden 建立的 passkey,此時改用 Chromium)。以嚴格的假 relying party 測試(Firefox:opt-in 測試,Mac 與 Linux 上的 Camoufox);2026-11-27 以 `bw` Vault 在 webauthn.io(Chromium)連續登入三次、註冊一次後登入,Bitwarden 擴充套件也能用這個 blindfill 建立的 passkey 登入;計數器會回寫 Vault;github.com(拋棄式帳號,2026-11-28,Linux 上的 Chromium):從設定新增 passkey,再在新 session 用 passkey 登入兩次,Bitwarden 擴充套件也用它登入,之後 blindfill 再登入一次 |
47
+
48
+ **接上瀏覽器。** 什麼都不設定時,`blindfill session start` 會自己開一個 Chromium(空的設定檔)。要用你已在執行的瀏覽器,在 `~/.config/blindfill/config.json` 設定 `web.endpoint`(以 `--remote-debugging-port` 啟動的 Chrome 為 `http://127.0.0.1:9222`)或 `web.endpointFile`(任何啟動器都能寫的 JSON 檔 `{"endpoint": "ws://…"}`),或用環境變數 `BLINDFILL_ENDPOINT` / `BLINDFILL_ENDPOINT_FILE`;之後 `blindfill session attach` 不必帶參數。各瀏覽器的限制(Chrome 的預設設定檔、Firefox 與 Camoufox 需要 Playwright 伺服器、Ego Lite 由 blindfill 自己開空的實例或透過 `ego-cli`):[docs/browsers.md](docs/browsers.md#connecting-a-browser)。
49
+
50
+ **平台。** macOS 與 Linux。Windows 10/11:測試套件(單元、洩漏與本機假頁 e2e,Chromium)在一台 Windows 11 電腦上通過,每次發布前也在 `windows-latest` 執行;**Windows 上的真實網站尚未測試**。Windows 上狀態、設定與設定檔資料夾改以 ACL 檢查,取代 0700/0600 權限(見 SECURITY.md);`bw` 請安裝原生 `bw.exe`(scoop 的 `bitwarden-cli` 或 Bitwarden 官方獨立下載),npm 的 `bw.cmd` 不經 shell 無法啟動;`ego-cli` 提供者不支援 Windows。
51
+
52
+ 瀏覽器提供者及其契約:[docs/browsers.md](docs/browsers.md)。每次測試紀錄(含失敗):[docs/TESTED.md](docs/TESTED.md)。
53
+
54
+ ## 已可運作(由測試套件驗證)
55
+
56
+ - **網頁填寫**:依密碼庫項目綁定來源、iframe 內的欄位只能透過明確規則填寫、規劃後頁面若導覽即拒絕輸入、略過蜜罐欄位、等待 SPA、單次送出、填寫後鎖定。
57
+ - **欄位規則與登入設定檔**:在項目(`blindfill.rules`)或本機設定檔中為各網站指定精確選擇器,用於啟發式無法辨識的表單。規則選擇器為純 CSS,不含值或狀態探測。
58
+ - **頁面工具**:`page discover|diagnose|verify|list` 只回報結構與布林值,絕不回傳內容值;工作階段鎖定時一律拒絕。
59
+ - **註冊**:`item generate` 以 CSPRNG 產生密碼並建立項目,密碼不會顯示;`register` 將其輸入綁定來源上的註冊表單(密碼與確認欄位)。`item generate --no-password` 建立只有使用者名稱、沒有密碼的項目,給只用 passkey 註冊的網站;密碼登入、`fill`、`register` 與 `android fill` 會明確回報「沒有密碼」並拒絕,不會填入空白。
60
+ - **驗證器設定**:`totp enroll --item <id> --selector <css>` 從綁定網頁上的單一元素讀出設定金鑰(或 `otpauth://totp` URI),存進尚無 TOTP 種子的項目;金鑰不會顯示,既有種子絕不覆蓋。之後用 `totp --fill` 填入驗證碼。
61
+ - **項目管理**:`item list|status|rename|edit`。機密值、來源與 `blindfill.*` 欄位只能在終端機中變更,唯一例外是 `blindfill.rules`,代理可以修改(見 SECURITY.md)。沒有 `item reveal`。
62
+ - **人工接手**:`handoff pause|resume` 將瀏覽器交給人處理 CAPTCHA、同意頁或 MFA;期間拒絕代理動作,且恢復後鎖定仍然有效。
63
+ - **介面**:CLI、MCP 伺服器(stdio)與函式庫 API(`withPage(page, …)`)。
64
+ - **洩漏測試**:填寫、規則、設定檔、頁面工具、註冊、項目管理與人工接手皆透過 CLI 與 MCP 執行,使用 canary 密碼與產生的密碼;所有輸出、錯誤、`DEBUG=pw:api` 日誌與狀態檔案都以原文、URL、Base64 與十六進位形式搜尋。
65
+
66
+ ## 尚未完成
67
+
68
+ - Android:儲存手動輸入的登入、在真實 app 中的註冊表單、WebView 與 Credential Manager 密碼、在真實 app 中註冊 passkey。WebKit。Firefox passkey 在真實網站或長期執行的 Camoufox 上使用。
69
+ - 部分真實網站仍需要真人或網站規則(例如 Walmart 的 Press & Hold 機器人驗證、部分 MFA 設定;見 [docs/TESTED.md](docs/TESTED.md))。其餘六個後端為盲寫且未驗證。
70
+
71
+ ## 快速試用
72
+
73
+ ```bash
74
+ npm ci && npm run build && npx playwright-core install chromium
75
+ export BW_SESSION="$(bw unlock --raw)" # env only
76
+ mkdir -p ~/.config/blindfill && echo '{"backend":"bw"}' > ~/.config/blindfill/config.json
77
+ node dist/cli.js backend list
78
+ node dist/cli.js session start --headless
79
+ node dist/cli.js fill --item <id> --url https://example.com/login --submit --expect-url /home
80
+ node dist/cli.js mcp # MCP server on stdio, see examples/mcp-config.json
81
+ ```
82
+
83
+ ## 開發
84
+
85
+ `npm run lint && npm test && npm run build`。架構說明:[docs/ARCHITECTURE.md](docs/ARCHITECTURE.md)。
86
+ 發布流程(main 上的 `package.json` 版本變更時觸發,使用 npm Trusted Publishing):[docs/RELEASING.md](docs/RELEASING.md)。MIT 授權。
87
+
88
+ ## 翻譯
89
+
90
+ 歡迎提交翻譯 PR:無論是改進現有的 [繁體中文](README.zh-TW.md)、[简体中文](README.zh-CN.md)、[日本語](README.ja.md)、[한국어](README.ko.md),或新增其他語言。一切以英文版 README 為準。
package/SECURITY.md ADDED
@@ -0,0 +1,223 @@
1
+ # Security policy
2
+
3
+ blindfill is **alpha software**. It has not had an independent security review. Read the limits
4
+ below before trusting it with accounts you cannot afford to lose.
5
+
6
+ ## What blindfill defends against
7
+
8
+ blindfill defends against **the model and its logs**:
9
+
10
+ - The agent is never handed a Secret-class value (password, TOTP seed, Hidden custom fields,
11
+ card number/CVV, private keys). No CLI command, MCP tool or library function returns one;
12
+ they can only be written into a field (`SecretHandle.into(sink)`).
13
+ - The agent cannot choose where a secret goes. The binding comes from the vault item's URIs
14
+ (Bitwarden match types) and is compared with the origin the browser actually reports.
15
+ - After a Secret has been filled, the session refuses page text, DOM and screenshots to the
16
+ caller, and every string leaving blindfill is scrubbed for the raw, URL-encoded, Base64
17
+ and JSON-escaped forms of the secrets handled in that process. If any output would match a
18
+ secret, the whole output is withheld, so a scrubbed echo cannot confirm a guess.
19
+ - Errors never echo caller input (rule ids, field and profile names), and evidence and rule
20
+ selectors cannot probe values or input state (no `[value…]`, substring attribute matches,
21
+ text selectors or state pseudo-classes). MCP schema-validation and unknown-tool errors return one
22
+ fixed code with no message.
23
+ - A fill types only into the documents it was planned on: a navigation (same-origin included) or a
24
+ replaced frame between planning and a write fails the fill, and nothing is re-bound. Without a
25
+ rule, only the top document is searched; a field inside a frame needs a `blindfill.rules` rule.
26
+ - Session state (`session.json`: post-fill lock and one-shot records) lives in a state directory
27
+ that must be owned by you with mode 0700 (otherwise refused). It is written atomically under a
28
+ lock file, and the lock and one-shot records only grow until `session stop`, so a CLI and an MCP
29
+ process running at once cannot clear each other's.
30
+ - Windows has no owner/mode bits, so the same checks (state directory, profiles directory, local
31
+ rules and profile files and their directory) read the owner and DACL by SID through the built-in
32
+ Windows PowerShell (`Get-Acl`): the owner and every allow entry, inherit-only ones included, must
33
+ be you, SYSTEM or Administrators (plus the CREATOR OWNER / OWNER RIGHTS placeholders); anything
34
+ else (Users, Everyone, another account, an AppContainer capability), a symlink or junction, or a
35
+ failed read is refused. A directory blindfill creates gets that DACL with inheritance removed
36
+ (`icacls /inheritance:r`), as `mkdir -m 0700` would; one that already exists is checked, not
37
+ changed. Administrators and SYSTEM are trusted as root is on POSIX. Windows has no `O_NOFOLLOW`,
38
+ so a rules or profile file is opened, then checked to be the same non-symlink file (file index)
39
+ at its path before the ACL check. `%TEMP%` and `%LOCALAPPDATA%` can carry extra entries (on the
40
+ test machine: sandbox accounts), so keep these directories under your profile (the defaults
41
+ `~/.local/state/blindfill` and `~/.config/blindfill` are).
42
+ - Changing secret values, origins, `blindfill.*` control fields or a password policy needs a
43
+ person at a terminal. There is no command that reveals a stored secret. The exceptions only add
44
+ or are field maps: adding a TOTP seed (`totp enroll`, point 18), adding a passkey (point 19) and
45
+ editing `blindfill.rules` (point 20). Adding a passkey or filling a sign-up password needs no
46
+ per-item opt-in (owner decision 2026-11-28): any item that binds the site or app, and for a passkey
47
+ holds none yet, can be used.
48
+ - Fill is one-shot: a Secret field is filled at most once per session and origin, and the
49
+ form is submitted at most once per call. Unknown outcomes are reported, never retried.
50
+ The submit control is checked before any secret is read; a control that is merely disabled
51
+ (`disabled` or under `aria-disabled="true"`) passes that check, because many sites enable it
52
+ only after the fields hold values. After filling, blindfill waits up to 3 s for it to enable,
53
+ checks it again in full and clicks once; if it stays disabled the submit is refused with the
54
+ fields already filled. A control under `[inert]` is refused before filling.
55
+ - A rule submit of kind `js` blocks, from just before the click until 1.5 s after it, the
56
+ form's `submit` event and any GET navigation of the rule's frame to the form's action with a
57
+ query (a native GET submission), so filled values cannot reach a URL that way. A native
58
+ submission the page fires later (after a slow request) is not covered. With
59
+ `"outside_form": true` the control may sit outside every form (a button, `role=button` or
60
+ `<a>` with no form owner and no `form*` attributes); it is looked up only in the rule's own
61
+ origin-bound frame, must be unique and visible, and is checked before any secret is read.
62
+ - Secrets are typed over https only; plain http is accepted for loopback dev hosts alone. Malformed
63
+ `blindfill.*` control data fails the operation instead of being skipped.
64
+ - A passkey's private key goes from the vault to a temporary Chromium virtual authenticator over
65
+ CDP; the page and the agent never receive it. It is used only when the item binds the page and
66
+ its rpId covers the host, at most once per session and origin. Before any item is written back
67
+ to `bw`, every key in it (passkey `keyValue`, SSH private key) is registered with the scrubber too.
68
+
69
+ ## What blindfill does NOT defend against
70
+
71
+ 1. **A malicious or compromised page.** The password is typed into the page's DOM. Scripts on
72
+ a page you bound the item to can read it. Binding to the right origin is the only
73
+ protection, so prefer the _Host_ or _Exact_ match type over _Base domain_.
74
+ 2. **A compromised host or browser.** Anyone who can read process memory, the browser profile
75
+ or the vault session (`BW_SESSION`) wins. Playwright needs the value as a JavaScript
76
+ string for a moment; JS strings cannot be zeroed. Only the `Buffer` inside `SecretHandle`
77
+ is zero-filled.
78
+ 3. **The agent driving the browser itself.** If the agent has _another_ tool attached to the
79
+ same browser (a Playwright MCP, a CDP console), it can read the DOM (including a filled
80
+ password field's value) through that tool. The post-fill lock only covers blindfill's own
81
+ interfaces. Give the agent blindfill _instead of_, not next to, an unrestricted browser
82
+ tool for the same session if this matters to you.
83
+ 4. **The returned TOTP code.** By design the current code is Ephemeral and readable. Its
84
+ safety rests on origin binding and its short lifetime.
85
+ 5. **Scrubbing is best effort.** It handles exact raw, URL-encoded, form-encoded, Base64
86
+ (including shifted alignments), hex and JSON-escaped forms. A page that transforms the
87
+ secret (rot13, splitting, hashing) defeats it. Secrets shorter than 4 characters are
88
+ not scrubbed.
89
+ 6. **Shadow DOM, closed iframes and canvas inputs** are not supported by the field detector;
90
+ blindfill stops (fail closed) rather than guessing.
91
+ 7. **Passkeys** are web sign-in and registration in Chromium and Firefox/Camoufox, and Android app
92
+ sign-in and registration. Assertions set the user-verified flag without a biometric: the vault unlock and the item
93
+ binding stand in for it. Chromium and Android set backup-eligible and backed-up as Bitwarden clients
94
+ do, unless the item says `blindfill.passkey_be=0`. Firefox cannot set that flag: its passkeys are
95
+ BE=0, and Bitwarden-made (BE=1) ones are signed there with BE=0 too (owner decision 2026-11-27); a
96
+ relying party that checks BE rejects that sign-in, an ordinary failure (use Chromium). Marionette
97
+ has no W3C `WebAuthn:SetCredentialProperties` yet; once it does, Firefox can set BE. Firefox needs its Marionette port (`-marionette`),
98
+ an unauthenticated loopback control port that any local process can use to drive the browser, and
99
+ the softtoken pref, which turns real USB security keys off in that browser. Its authenticator is
100
+ browser-wide while armed (up to 15 s): any focused page of that browser that WebAuthn allows for
101
+ the rpId could get the signature, not only blindfill's page.
102
+ After a signature the sign counter is raised in the vault without a person at a terminal (owner
103
+ decision): that write changes only the counter and never lowers it. A stored counter of 0 stays 0
104
+ on Android; Chromium always counts up. A failed write is reported (`counter_written_back: false`,
105
+ `counter_error`), not retried, and the next sign-in repeats the counter, which strict relying
106
+ parties refuse. While a web passkey is armed (up to 15 s), any frame of that page that WebAuthn
107
+ allows for the rpId may trigger the signature.
108
+ 8. **Backends marked "blind-written/unverified"** have never touched a real vault. They pass
109
+ contract tests against recorded fixtures only. `bw` runs in CI against a mock CLI; it passed one
110
+ live run against a Vaultwarden instance on 2026-11-27, with throw-away items on local fake pages
111
+ ([docs/TESTED.md](docs/TESTED.md)).
112
+ 9. **"A person at a terminal" means a TTY.** An agent that runs blindfill inside a
113
+ pseudo-terminal passes that check. Do not give an agent a PTY if item edits matter.
114
+ 10. **Generated passwords go where the agent registers.** `item generate` binds a new item to
115
+ origins the caller names, and `register` types the generated password there. That is the
116
+ purpose; it gives the agent no access to existing items.
117
+ 11. **Local rules and profiles are trusted.** Anyone who can write the config directory can
118
+ define selectors for an item's bound origin (selectors are still restricted, see above).
119
+ 12. **Navigation is not locked.** After a fill, `fill --url` may still navigate; reads stay
120
+ refused until `session stop`.
121
+ 13. **Human handoff is unobserved.** While paused, blindfill neither watches nor limits what the
122
+ person does in the browser; it only refuses agent actions.
123
+ 14. **Outcome reporting is a small channel by design.** `verify` and `--expect-*` return
124
+ booleans for caller-chosen structural selectors; they cannot select on values.
125
+ 15. **Rule-less fills have one gap.** Without a rule, the form must be a single login form in the
126
+ top document and submit goes only through its one native POST button, but there are no
127
+ page-text heuristics for newsletter and password-reset forms. Use `blindfill.rules` for
128
+ sites that matter, for forms without a `<form>` element and for fields inside frames.
129
+ 16. **Android companion trust.** Passwords pass through the companion's memory into the autofill
130
+ framework and then the app, which receives them by design. The arm token travels as an `adb`
131
+ argument (visible to the host user's processes for a moment). Any app on the phone can connect
132
+ to the loopback port; without the token it gets nothing, but its connection ends the arm (fails
133
+ closed, the agent re-arms). The companion trusts the system's package and signer report (and a
134
+ WebView's own domain report, item 22); a rooted
135
+ or compromised phone defeats it. Before every arm the host reads the installed companion APK back
136
+ from the phone (`pm path`, `adb exec-out cat`), parses its APK Signing Block and refuses unless
137
+ its only signer certificate has SHA-256
138
+ `C7EDE55AB64522DC9BC142F8F20B9BAABE5341D828210183D991157FE0EC45C8` (an app that merely reuses the
139
+ package name is not armed). This trusts `adb` and PackageManager, which verified the signature at
140
+ install; it does not re-verify the signature bytes. `BLINDFILL_COMPANION_SIGNER` overrides the pin
141
+ for development builds; anyone who controls the host's environment can set it. The release key
142
+ (PKCS12, RSA 4096) lives in the owner's `~/.config/blindfill/` (0600), in the GitHub Actions
143
+ secrets `ANDROID_KEYSTORE_B64`/`ANDROID_KEYSTORE_PASSWORD`, and as an age-encrypted backup; it is
144
+ never committed. CI and the release workflow check the built APK's signer with `apksigner`.
145
+ 17. **A key stored in a Hidden custom field is treated as a password.** blindfill recognises keys
146
+ only in their dedicated places (the item's TOTP field, SSH-key items, passkeys). A private key,
147
+ seed or recovery code pasted into a Hidden custom field is an ordinary Secret: it cannot be read,
148
+ but it can be filled into a page the item binds. Keep keys in their dedicated fields.
149
+ 18. **An agent can add a TOTP seed to an item that has none** (`totp enroll`, owner decision
150
+ 2026-11-27). blindfill reads the setup key or `otpauth://totp` URI from one element of the top
151
+ document on a page the item binds and writes it to the item's TOTP field; the agent gets only the
152
+ item id. An item that already has a seed is refused (the `bw` backend refuses too), so an agent
153
+ cannot swap a working seed for one it controls. It can still give a seedless item a seed from any
154
+ page that item binds, which is the purpose. No QR decoding; a key inside an iframe is unreachable.
155
+ 19. **An agent can add a passkey to an item that has none** (`passkey register`, owner decision
156
+ 2026-11-27, no terminal; no opt-in since 2026-11-28). Any item that binds the page qualifies;
157
+ an item that already holds a passkey is refused, so an agent cannot replace a working one. The
158
+ page's own `create()` is answered once by an empty Chromium virtual authenticator, offered ES256
159
+ only; the new private key goes from the browser into the vault in one `bw edit` and the agent
160
+ gets the rpId and credential id. If the vault write fails (`vault_write_failed`) or the key is
161
+ unusable (`not_stored`), the relying party may keep a passkey the vault does not have; a person
162
+ must delete it there. On Android (`android passkey-register --rp-id`) the item must also bind the
163
+ app (`androidapp://`, plus its `blindfill.signers` pin if it has one; see 21) and `https://<rpId>`, which stands in for the Digital
164
+ Asset Links check a credential provider owes native apps; the host makes the key and stores it
165
+ before the phone gets the attestation, so a failed vault write leaves no passkey at the app.
166
+ 20. **An agent can rewrite an item's rules** (`item edit --set blindfill.rules=…` without a terminal,
167
+ owner decision 2026-11-27). Rules still parse strictly and a rule naming an origin the item does
168
+ not bind is refused at fill time, but
169
+ an agent misled by page text could map the password field to a visible input on a bound origin
170
+ (a comment box, a profile field) and so publish the password there. Origin binding does not stop
171
+ that; review rule changes in the audit log (`event: item`, field `blindfill.rules`).
172
+ 21. **Android apps are bound by package name; a signer pin is optional** (owner decision
173
+ 2026-11-27, as Bitwarden does). An item with `androidapp://<package>` and no `blindfill.signers`
174
+ gives its password (autofill or Credential Manager), passkey sign-in and passkey registration (no
175
+ opt-in, any item without a passkey) to
176
+ whatever app has that package name. **If a fake app with the same package name replaces the real
177
+ one** (sideloaded after the real app is removed, or installed on a phone that never had it), it
178
+ gets the password. Android refuses to install a differently signed APK over an installed one, so
179
+ the risk is an app that was absent or uninstalled. Add `blindfill.signers` (SHA-256 of the
180
+ signing certificate) to an item to close it; with a pin, the signer must match.
181
+ 22. **WebViews are bound by the domain alone** (owner decision 2026-11-27). A login or sign-up form
182
+ inside any app's WebView gets an item's password when every web node on the screen reports the
183
+ same `https` domain and the item binds `https://<that domain>` (host match by default); the app
184
+ itself need not be bound, so one item serves the site and the apps that show it. The domain is
185
+ reported by the WebView in the app's own process: **an app can claim any domain** (load its own
186
+ page with that base URL) and so receive the password of any item that binds that domain. Only
187
+ arm WebView fills for apps you trust, as with a browser. Passkeys are not offered to WebViews.
188
+ 23. **App sign-up fills a generated password** (`android register`, `password-new`). The item must
189
+ bind the app (item 21) or the
190
+ WebView's domain (item 22); the screen must look like sign-up (two password fields, or one with a
191
+ new-password hint; more than two is refused). The same password goes into the password and its
192
+ confirmation. blindfill does not submit and cannot tell whether the account was created; if the
193
+ app rejects the password, the item keeps a password the account does not have. Since 2026-11-28
194
+ there is no opt-in: an agent can fill any bound item's password into any sign-up form of that
195
+ site or app (web `register`, `android register`). An item made with `item generate --no-password`
196
+ (passkey-only sites) has no password; password login, fill, `register` and `android fill` refuse
197
+ it with "no password" rather than fill a blank.
198
+ 24. **`ego-cli` passes filled values through Ego Lite's Node runtime** (supported provider; owner
199
+ decision 2026-11-28). Values travel as CDP `Input.insertText` parameters through Ego's own
200
+ closed-source agent runtime, outside blindfill's control. Cross-origin (out-of-process) iframes
201
+ are reached by attaching to their targets from the page's session (since 2026-11-28); a value
202
+ for such a frame travels the same way, on that frame's own session, after the same in-Ego origin
203
+ and focus re-check. Passkeys are not supported: Ego accepts the WebAuthn commands, but in a
204
+ 2026-11-28 probe the page's ceremony never reached the virtual authenticator. After a submit,
205
+ Ego's password manager runs Google's password leak check, as for a password typed by hand.
206
+ Checked once on Ego Lite 0.6.3.17
207
+ (2026-11-28, about 3 minutes, fake login page and fake passwords): outbound traffic (net-export
208
+ with raw bytes, per-process sockets) carried the value only to the page it was typed into; no
209
+ Sentry or PostHog report was sent, also after forced errors; a renderer crash dump did not
210
+ contain it and Crashpad uploads are off; nothing on disk. **Not checked**, accepted by the owner
211
+ on 2026-11-28: longer traffic captures (telemetry sent later), the Ego UI operation log, QUIC
212
+ payloads, process memory, and later Ego versions. Details:
213
+ [docs/browsers.md](docs/browsers.md#ego-lite).
214
+
215
+ ## Reporting a vulnerability
216
+
217
+ Please do **not** open a public issue. Use GitHub's private vulnerability reporting
218
+ ("Security" tab → "Report a vulnerability") on the repository once it is public. A dedicated
219
+ contact address will be added here before the first public release.
220
+
221
+ Useful reports include: any path that returns a Secret-class value, any bypass of origin
222
+ binding or the post-fill lock, and any leak of a secret or `BW_SESSION` into logs, audit
223
+ files or error messages.