Comment by CM30

11 days ago

Client side A/B testing through services like Optimizely and VWO and Adobe Target is a massive security nightmare in of itself. You're giving anyone with access to a third party service the ability to run any code they like on your website, and change any and all interface elements as they see fit.

Even one of these accounts being compromised would be a massive security incident that would potentially put millions of people's data at risk.

I agree. I implemented A/B testing as a feature in my self-hosted analytics app[0] and I have decided to vastly limit what can be automatically changes through the A/B editor. It only allows to change text or CSS/styles on page, nothing else (no DOM elements, no JS, etc.). This is quite limiting, but I simply couldn't convince myself that letting an analytics dashboard insert arbitrary JS/code on a website is ever a good idea.

That being said, self-hosting still makes a HUGE difference, even if those sort of breaches happen, the impact is a lot more limited, and easier to detect and fix.

[0]: https://www.uxwizz.com

Just pointing out that these testing solutions can also be deployed server-side instead of via client-side tags. I suspect that is the route a lot of their customers will take now.

  • And even at the edge via things like edge side includes or their modern worker versions.

  • Ehh. This has been going on for decades, I don't see engineers changing such time-honoured traditions.

    In my experience the vulnerabilities are coming from tools brought in by less technical teams, which then get misused by engineers.

    These tools are oddly "safe" in the hands of Marketing and the like, because nobody trusts Marketing, so they stick a bunch of guardrails in place to stop anything stupid from doing serious damage.

    The same tools are dangerous in the hands of engineers - many engineers trust themselves to do risky things, and will bludgeon you with debate if you tell them they have to follow the same rules as those _simpletons_ in Marketing.

    They're usually client-side because engineers don't want to waste time implementing things for Marketing (or more accurately, struggle to support a domain that is radically multidisciplinary and just-in-time and revolves around conforming to non-engineering industry norms, to such a degree that everyone prefers siloing themselves), and the safe space given to Marketing is usually a client-side tag manager so that's where they do it when they have to do it themselves, and then once the tool is implemented client-side, engineers piggybacking off it aren't going to bother with doing a new server-side implementation.

    Cue engineers loading Optimizely in their secure product areas, getting exceptions added to CSPs, and the like. Then a major incident. Then a post-mortem highlighting the risks of letting Marketing manage SaaS, then a project to make a secure in-house experimentation solution which the engineers will abandon shortly afterwards... and then finally, a couple years later, someone will discover Marketing has procured Optimizely 2.0 and the cycle repeats.