๐ก๏ธ Sentinel: [HIGH] Fix Clickjacking Vulnerability via Frame-Busting#46
Conversation
Co-authored-by: ImChong <74563097+ImChong@users.noreply.github.com>
|
๐ Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a ๐ emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
๐จ Severity: HIGH
๐ก Vulnerability: The application was vulnerable to clickjacking. It relies on
<meta>tags for its Content-Security-Policy, but browsers ignore theframe-ancestorsdirective when delivered this way. This allowed the site to be framed by malicious actors.๐ฏ Impact: Attackers could embed the site in an iframe to trick users into interacting with the application unintentionally (e.g., clicking hidden buttons).
๐ง Fix: Added a JavaScript frame-busting snippet to
js/theme-init.jswhich executes early on page load. If the page detects it's not the top-level window, it redirects the top-level window to itself.โ Verification: Ran
npm run checkto ensure formatting and linting pass. Verified the code was properly inserted intotheme-init.js.PR created automatically by Jules for task 3819683403028586314 started by @ImChong