sonarjs/insecure-cookie
eslint-plugin-sonarjs
No autofixRecommended
eslint.config.js
export default [
{
rules: {
"sonarjs/insecure-cookie": "error",
},
},
];The documentation shows no incorrect example for this rule.
let session = cookieSession({
secure: true,// Compliant
}); // Compliantconst express = require('express');
const session = require('express-session');
let app = express();
app.use(session({
cookie:
{
secure: true // Compliant
}
}));let cookies = new Cookies(req, res, { keys: keys });
cookies.set('LastVisit', new Date().toISOString(), {
secure: true // Compliant
}); // CompliantExamples from the ESLint documentation.
sonarjs/insecure-cookie
eslint-plugin-sonarjs
export default [
{
rules: {
"sonarjs/insecure-cookie": "error",
},
},
];Oxlint does not have this rule.
Biome does not have this rule.
"indexOf" checks should not be for positive numbers
JWT should be signed and verified with strong cipher algorithms
Functions should be called consistently with or without "new"
Assertion arguments should be passed in the correct order
"in" should not be used with primitive types
React components should not render non-boolean condition values