Session cookie without Secure or HttpOnly
Partialmedium severity · reads .ts .tsx .js .jsx .mjs .cjs .pyBeta
Without these flags a session cookie can be read by scripts or sent over plain HTTP. Marked Partial: confirm it is a session cookie. When Lintsure finds this, it marks it as Partial: it may be fine, depending on context only you can confirm.
What it looks like
A line Lintsure flags in its own test app:
// src/more.ts
res.cookie("session", user.token, { httpOnly: false });How to fix it
Set secure: true and httpOnly: true on session cookies.
Through a coding agent, Lintsure suggests the change and waits. Nothing is edited until you approve it.
Controls it relates to
What the framework asks
SOC 2 CC6.1: Logical access
Only the right people and systems can reach data. Secrets are protected, passwords are stored safely.
Evidence a reviewer may ask for: Access settings, secret storage and password hashing.
ISO 27001 A.8.5: Secure authentication
Log-in and sessions are built so they can't easily be stolen or bypassed.
Evidence a reviewer may ask for: Authentication and session settings.
Summaries are our own reading of the public texts, not the official wording.
Read more: Which SOC 2 controls you can check in code
Check your code for this
Runs on your machine. Your code is never uploaded.
npx lintsure scanThis rule is in Beta: its mapping to framework controls is waiting for review by a qualified compliance professional. Lintsure is a readiness tool, not an audit or legal advice. A finding, or the lack of one, doesn't make you compliant. Disclaimer