Research · Build · DiscoverComputational Science & Engineering

Applied Computing

CookieGuard AI

Cookie security checks for AI browser agents, automated tests, and CI.

Can a successful login still leave its session cookie insecure?

CookieGuard AI helps build trust in AI browser agents by independently checking how their login cookies are protected.

1,852 reported downloads across 6 npm and PyPI packages (through Nov 5, 2026; 1 package awaiting its first report; includes recorded snapshot). The Browser Use integration is also available as a Python beta, and an MCP server is available as a development preview. Download counts include dependencies and repeat installs, so they do not represent unique users.

The Original Extension in Use

Screenshots from the Chrome extension, which remains part of the expanded project.

CookieGuard AI popup after scanning a page. Digital identity exposure: High, with 4 session cookies, 1 at-risk cookie, and 11 cookies scanned. Tracking exposure: Low, with 1 tracking cookie. A summary line reads: CookieGuard detected 1 risky session cookie on this page. Two buttons follow: Why this matters, and Protect yourself.
Scan the pageOne click summarizes the page: session cookies, cookies at risk, and tracking exposure, with a plain-language explanation one tap away.
AI Model Details panel. Model: CookieGuard Random Forest Classifier, version 3.0, on-device ONNX, 38 features. Benchmarks: 3 models tested, 38 features, 4 classes, calibrated. A table lists RandomForest (selected) at 100% accuracy and 1.000 PR-AUC, HistGradBoost at 99.6% and 1.000, and LogisticReg at 99.3% and 1.000. Note: selected by recall at a false-positive rate of at most 0.10, then PR-AUC for the authentication class.
See the model behind itA details panel names the on-device classifier, the three models that were compared, and the rule used to choose between them.

A flag indicates a potential risk in how a cookie is configured, not proof of an exploit. The benchmark scores come from synthetic cookie data and describe controlled conditions, not real-world accuracy.

From Browser Extension to Developer Toolkit

Local cookie-policy checks across browser agents, tests, and CI. The MCP integration is a development preview.

  • Browser Use agents

    A Python beta observes cookies during an AI agent's browser workflow. The local engine evaluates the evidence, and the calling code can enforce the result even when the agent reports success.

  • Playwright tests

    The npm adapter collects cookie declarations and browser observations during login tests, so a successful login can still fail the configured cookie policy.

  • CLI and GitHub Action

    Check response headers from a test application, produce reports without cookie values, and return distinct outcomes for a pass, a confirmed violation, or an incomplete audit.

  • MCP server preview

    Two local tools let an AI client inspect the configured policy and scan an allowed endpoint. This development preview runs from the repository; it is not yet an npm release.

  • Evidence and explanations

    Checks cover HttpOnly, Secure, SameSite, domain scope, lifetime, cookie prefixes, and regressions. Findings include the evidence and suggested fix; uncertain cases remain review items.

  • Original Chrome extension

    The extension still offers interactive scans, an on-device authentication-cookie classifier, tracking-cookie identification, and plain-language explanations.

The Browser Use and Playwright integrations observe authenticated browser workflows. The CLI, Action, and MCP preview inspect response headers without logging in. The local policy engine reports pass, fail, or incomplete; a pass covers the configured cookie checks, not the security of the whole application.

What I Did

I designed and published the original Chrome extension, then expanded CookieGuard into a toolkit for developers and AI browser agents. The project keeps the reasoning visible through explicit policy checks, evidence, and suggested fixes, with examples that demonstrate both passing and failing configurations.

  • Built the Chrome extension and on-device classifier
  • Expanded the local cookie-policy engine and explanations
  • Released three npm packages for the CLI, core engine, and Playwright
  • Added a GitHub Action and reproducible pass/fail demos
  • Released the Browser Use integration as a Python beta
  • Added an MCP server preview for AI clients

npm Toolkit

CLI, core engine, and Playwright · v0.1.0 beta

Get CookieGuard CI

Browser Use

Python package · v0.1.0b1 beta

View on PyPI

MCP Preview

Local tools for AI clients · source only

Read the guide