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 header is the browser's clickjacking defense. With it off, an attacker can embed the application in a hidden <iframe> on a malicious page and trick a logged-in victim into clicking UI elements they cannot see (CWE-1021).
Keep X-Frame-Options set to DENY or SAMEORIGIN, e.g. frameOptions(f -> f.sameOrigin()) or frameOptions(f -> f.deny()). If you need to allow framing from a specific set of origins, use a Content Security Policy frame-ancestors directive instead of disabling the protection outright.
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.