MEDIUM AI PREVALENCE: MEDIUM auth.php.session.insecure-ini
A PHP session hardening flag is turned off at runtime with ini_set(): session.cookie_httponly, session.cookie_secure, or session.use_only_cookies set to 0 / '0' / false.
Why AI tools produce this: AI coding tools produce this regularly, typically when prompted for a shortcut or a quick fix.
Why this matters
This exposes the session cookie to JavaScript (XSS), lets it travel over plain HTTP, or allows the session id in the URL to be accepted (CWE-1004). AI-generated code flips these off to work around a local setup and the weakened configuration ships.
Enable them instead (or set them in php.ini): ini_set('session.cookie_httponly', 1); ini_set('session.cookie_secure', 1); ini_set('session.use_only_cookies', 1);
VULNERABLE
SAFE
Suppressing this rule
If a finding is a genuine false positive, scope the suppression to the exact line and leave a reason, never disable the rule project-wide. Disable directives are line-scoped by design.
// oauthlint-disable-next-line auth.php.session.insecure-ini -- <reason>