Skip to content

fix(rules): cookie-flags reports a platform routing cookie (Lovable __dpl) as info #1378 - #1381

Closed
nc9 wants to merge 3 commits into
mainfrom
fix/cookie-flags-platform-1378
Closed

nc9 wants to merge 3 commits into
mainfrom
fix/cookie-flags-platform-1378

Conversation

@nc9

@nc9 nc9 commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #1378.

security/cookie-flags warned cookie-httponly for Lovable's own __dpl cookie on 95% of Lovable sites. The platform sets it, the owner can't change it, and it holds no session.

  • The exempt cookies live in one list, packages/rules/src/security/platform-cookies.ts: exact cookie name, platform, docs link. It starts with __dpl (Lovable); each entry also records its evidence, because Lovable does not document the cookie (the docs link is the platform's docs home).
  • A listed cookie without HttpOnly now gives an info check, cookie-httponly-platform, worded as "commonly carried by Lovable-hosted sites; the platform does not document it" (evidence: 1,013 of 1,066 Lovable sites in the 35k batch, the only cookie), not as a platform fact. No cookie-httponly warning for it.
  • Every other cookie warns as before, whatever its name or value (the exemption is an exact-name match, so session=<random>, __dpl2 and __DPL still warn). Secure, SameSite and SameSite=None results are unchanged.

Tests (packages/rules/tests/cookie-flags.test.ts, 7 new): __dpl alone gives info and no warn or fail; a session cookie beside __dpl warns naming only the session cookie; a session cookie alone warns; Secure/SameSite/None results for __dpl unchanged; HttpOnly set adds no platform info; the list entries each have a platform and an https docs link; exact-name matching. Gates: rules tests (cookie-flags, private-target-skip), tsgo in packages/rules, oxlint, make validate.

Docs: docs/rules/security/cookie-flags.mdx (new check and an "exempt from the HttpOnly check" section). CHANGELOG under Unreleased / Fixed. Skill: no change needed.

nik

The exemption is by exact name on any site (noted in the docs). CHANGELOG bullet is under Unreleased and will conflict with #1380's at the same line: whoever merges second rebases.

nc9 added 2 commits October 31, 2026 08:09
…(Lovable __dpl) as info, not an HttpOnly warning #1378

Signed-off-by: Nik Cubrilovic <[email protected]>
… claim; CHANGELOG under Unreleased #1378

Signed-off-by: Nik Cubrilovic <[email protected]>
@nc9
nc9 force-pushed the fix/cookie-flags-platform-1378 branch from 5fcb3fa to 05db32b Compare October 30, 2026 21:10
@nc9

nc9 commented Oct 31, 2026

Copy link
Copy Markdown
Contributor Author

Landed in v0.0.146 as df3a7916 feb9920e 95d9fc48 via #1383. Release: https://github.com/squirrelscan/squirrelscan/releases/tag/v0.0.146. Closing this original.

nik

@nc9 nc9 closed this Oct 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

1 participant