Rules

No X-Frame-Options or frame-ancestors, so your site can be framed

SR-WEB-003 · Low

If any site can load your pages in a frame, it can place them under its own buttons and trick users into clicking things they cannot see, such as deleting an account or confirming a payment. This is called clickjacking. The fix is to send X-Frame-Options: DENY, or SAMEORIGIN if your own site frames its pages, or the newer frame-ancestors 'none' directive in your Content-Security-Policy. Both must be sent as HTTP response headers. Setting X-Frame-Options in a meta tag has no effect.

The fix

Before · Terminal
$ curl -sI https://yourapp.com | grep -i x-frame-options
$
After · next.config.js
module.exports = {
  async headers() {
    return [
      {
        source: "/(.*)",
        headers: [{ key: "X-Frame-Options", value: "DENY" }],
      },
    ];
  },
};

How ShipReady finds it

shipready url requests your page once and reports when the response has no X-Frame-Options header and no frame-ancestors directive in its Content-Security-Policy. Findings carry rule ID SR-WEB-003.

Run the check

Terminal
npx @shipmate-agency/shipready url https://yourapp.com

The GitHub Action deeflect/shipready@v0.2.0 scans the repo only, so run this check against your deployed site.

Want a person to check every area and send the fixes as pull requests? Launch Lockdown, $950 once.