Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disallow any domain from embeding a page to prevent clickjacking #322

Merged
merged 1 commit into from
Oct 5, 2023

Commits on Oct 4, 2023

  1. Disallow any domain from embeding a page to prevent clickjacking

    Other sites could iframe GOV.UK into theirs and potentially use CSS/JS
    clickjacking to capture keystrokes etc.  It was not done before because in 2020
    there were a couple of instances where non-origin framing was a valid use case
    (e.g. we used to a side-by-side browser for sites transitioning content to
    GOV.UK so the departments could see where their pages will redirect to)
    
    In 2023, the side-by-side browser
    (https://docs.publishing.service.gov.uk/repos/side-by-side-browser.html) is now
    retired, and we now have the GOV.UK Account in place and a potential move
    towards personalisation, so the likelihood of an attacker attempting to steal
    GOV.UK credentials is growing.
    
    Decided to use `frame-ancestors` directive rather than `X-Frame-Options` HTTP
    response header as they have more drawbacks the main one being the fact that
    they are now deprecated.
    AgaDufrat committed Oct 4, 2023
    Configuration menu
    Copy the full SHA
    e845ded View commit details
    Browse the repository at this point in the history