- Startseite
- Plugins
- Tools & Funktionen
- dsh-plugin-cookie-whitelist
dsh-plugin-cookie-whitelist
wth373737/dsh-plugin-cookie-whitelist
Gives the agent your browser login state only for domains you approve: a Chromium/Firefox extension filters cookies to the approved list before they leave the browser, a token-gated 127.0.0.1 receiver keeps them in Host memory, and a disposable read-only browser opens pages, follows links and extracts PDF text with form submission and every non-GET request blocked. Its HTTP routes have no DSH access check, so a web page open in your browser could call them.
Installation
dsh plugin --profile web add github:wth373737/dsh-plugin-cookie-whitelistREADME
dsh-plugin-cookie-whitelist
Give the agent your login state only for domains you approve — with a browser extension, a localhost receiver, an in-memory vault, and a read-only CDP browser.
This plugin lets DeepSeek Harness read pages that need your browser session. Cookies are read inside Chrome, Edge, or Firefox by an extension, filtered to an approved domain list before they leave the browser, posted to 127.0.0.1 with a pairing token, and kept only in Host process memory. The agent then uses a disposable incognito Chrome/Edge instance that receives cookies for the current whitelisted domain only.
At a glance
- Extension side — Chromium Manifest V3 and Firefox Manifest V2 share one
background.js; the only network destination ishttp://127.0.0.1:<port>. - Host side — token-gated receiver, per-domain authorization requests, in-memory vault with TTL, read-only browser, optional interactive login fallback, and a settings page.
- Read-only by construction — form submit,
requestSubmit,window.open, and every non-GET/HEAD/OPTIONSrequest are blocked. There is no fill tool. - No cookie persistence — values are never written to disk, logs, tool results, or the settings UI. The browser profile is disposable and incognito.
Install
-
Install the DSH plugin:
dsh plugin --profile desktop add github:wth373737/dsh-plugin-cookie-whitelistor use Plugins → + Add plugin, or
plugin_manager'sinstall_bundleagainst a local checkout while developing. -
Open Settings → Cookie Whitelist; copy the receiver URL and pairing token.
-
Load the extension:
- Chrome/Edge:
chrome://extensions→ Developer mode → Load unpacked →extension/chromium. - Firefox:
about:debugging→ This Firefox → Load Temporary Add-on →extension/firefox/manifest.json.
- Chrome/Edge:
-
Paste the URL and token into the extension options; click Test connection.
-
Add domains in the settings page, or let the agent call
cookie_authorizeand approve it in chat.
For browsers without a supported extension, use the settings page's Temporary browser login window: it opens a disposable incognito Chrome/Edge window, the user logs in by hand, and Finish and capture copies the domain's cookies into the vault.
Until one of those two paths is in place the plugin accepts no cookies, so cookie_browse visits every site anonymously.
Tools
| Tool | Purpose |
|---|---|
cookie_whitelist_status | Whitelist, pending requests, extension heartbeat, vault counts, browser state. Never returns values. |
cookie_authorize | Ask the user to approve one domain; approval is a user action. |
cookie_sync | Ask the extension to re-read approved domains; counts only. |
cookie_browse | Read-only open / read / snapshot / click / scroll / screenshot / files / read_file / status / close. |
Files and Course Planner
Course pages often put test dates, schedules, rubrics, and guidelines in files rather than page text. Use:
cookie_browse { action: "files" }
cookie_browse { action: "read_file", url: "<mod/resource link>" }
read_file downloads with whitelist cookies only, follows an HTML resource wrapper to a preferred Course Planner / Schedule / Syllabus / Teaching Plan PDF, and extracts PDF text with pdfjs-dist. Files above the default 8 MB limit trigger a chat approval. Nothing is kept by default; ask before using keep: true. This matters: in CMT221W the Test 1 date appears only in the Course Planner PDF.
Security model
- The receiver binds
127.0.0.1only and requires the pairing token on every/v1/*call. - A request whose
Originis an ordinaryhttp(s)page is rejected; only extension origins and local header-bearing calls pass. - Cookies are accepted only when the cookie's own
Domainapplies to the requested whitelisted domain; the Host re-filters every delivery. - Before each navigation the browser jar is cleared, then only cookies whose domain matches the whitelisted target are injected.
- Non-whitelisted top-level pages have the
Cookieheader stripped from every intercepted request. - The extension's
<all_urls>permission is required by the cookies API; it has no content scripts, no telemetry, and no remote endpoint.
See SECURITY.md and docs/ARCHITECTURE.md for the full threat model.
Known limits
- Some sites reject cloned sessions (device binding, risk controls); the mechanism is not a guarantee.
- CAPTCHA/2FA requires the user; the temporary login window is the fallback.
- Firefox needs a temporary or signed add-on; Chrome/Edge use developer-mode unpacked loading.
- Chrome/Edge forbid remote debugging on the default profile, so an isolated profile is used intentionally.
- Screenshots can contain personal data; if the
attachmentsservice is unavailable the PNG is written to the plugin'sshots/directory.
Development
node scripts/build-extensions.mjs
node test/smoke.mjs
node test/file-reader.mjs
node test/extension-sim.mjs
node test/browser.mjs # requires Chrome/Edge; launches a disposable instance
node test/host-sim.mjs
License
MIT. Original icons. The Host half depends on pdfjs-dist for PDF text extraction; the browser extension has no third-party runtime.
Ähnliche Plugins
archify (deepseek-harness)
tt-a1i/archify
WeKnora (dsh-weknora)
tencent/weknora
next-ai-draw-io (dsh-plugin)
dayuanjiang/next-ai-draw-io
weknora
tencent/weknora