Skip to content

cookie-flags: HttpOnly warning fires on hosting platforms' own cookies (Lovable __dpl on 95% of Lovable sites) #1378

Closed

Description

@nc9

What happens

security/cookie-flags warns cookie-httponly for every cookie that lacks HttpOnly, whatever the cookie is for. Hosting platforms set their own non-sensitive cookies on every site they serve, so every site on that platform gets the same warning for a cookie the site owner didn't set and can't change.

Example: Lovable sets __dpl (deployment pinning) on every Lovable-hosted site. In a batch of ~35k audits (v0.0.141), 1,013 of 1,066 Lovable sites (95%) got cookie-httponly and nothing else from this rule, all for __dpl. Across the batch, "built on Lovable" shows up as 9.5x more likely to have cookie-flag problems, but the whole effect comes from one platform cookie.

HttpOnly matters for session and auth cookies, which JavaScript has no reason to read. A routing or deployment cookie with no secret in it isn't an XSS cookie-theft risk.

Expected

  • A cookie a known hosting platform sets for routing or deployment (starting with Lovable's __dpl) doesn't produce a cookie-httponly warning. It shows up as info naming the platform, so the owner knows where it comes from.
  • Session-looking cookies (names like session, sid, auth, token, jwt, or a high-entropy value) still warn when they lack HttpOnly, as now.
  • Secure and SameSite checks are unchanged.

Acceptance Criteria

  • A page whose only cookie is __dpl (no HttpOnly) gives no cookie-httponly warning; the check reports info that names the platform.
  • A page setting session=<random 32 chars> without HttpOnly still gives a cookie-httponly warning.
  • The list of known platform cookies lives in one place, and each entry names the platform and links to that platform's docs.
  • Secure and SameSite results for __dpl are the same as today.
  • The rule's docs page says which cookies are exempt from the HttpOnly check and why.

Activity

  1. added
    size: S
    rules
    on Oct 30, 2026
  2. added theissue type on Oct 30, 2026
  3. WilliamK112 commented on Oct 30, 2026

    @WilliamK112
    Contributor

    I can take this. I’ll keep the exemption centralized with the platform name and documentation URL, limit it to the HttpOnly check, add coverage for both __dpl and a session-looking cookie, and update the rule docs.

  4. nc9 commented on Oct 30, 2026

    @nc9
    ContributorAuthor

    More data from the same ~35k-audit batch, counting the cookies that trip security/cookie-flags. 4,409 sites had a finding. On 3,885 of them (88%), every flagged cookie is one of these:

    • Hosting-platform cookies: __dpl (Lovable, 1,026 sites), GAESA (Google App Engine, 243), AWSALB/AWSALBCORS (AWS load balancer stickiness)
    • CSRF double-submit tokens, which must be readable by JavaScript by design: XSRF-TOKEN (578; Laravel and Angular read it from JS), csrftoken (102; Django's JS reads it). Adding HttpOnly here breaks the app.
    • Preference cookies: NEXT_LOCALE (639), localization and cart_currency (Shopify), lang, locale

    Only 524 sites (1.5% of scored sites) have an actual session or auth cookie (PHPSESSID, laravel_session, ci_session, session, sessionid and similar) missing HttpOnly or Secure.

    Suggest widening this issue's acceptance criteria: CSRF token cookies are exempt from the HttpOnly check. They still get Secure and SameSite.

    nik

  5. nc9 commented on Oct 31, 2026

    @nc9
    ContributorAuthor

    The first part shipped in v0.0.146 (df3a7916 feb9920e 95d9fc48): security/cookie-flags no longer warns about Lovable's __dpl routing cookie. Leaving this open: the CSRF cookie follow-up is tracked in #1390.

    nik

  6. nc9 commented on Oct 31, 2026

    @nc9
    ContributorAuthor

    Shipped in v0.0.147 (f03f2ee7 796d83ed (and df3a7916 feb9920e 95d9fc48 in v0.0.146)), verified against main: every acceptance criterion is met. Release: https://github.com/squirrelscan/squirrelscan/releases/tag/v0.0.147

    nik

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    rulessize: S

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions