• Zarobi@aussie.zone
    link
    fedilink
    English
    arrow-up
    22
    ·
    10 hours ago

    A decent content security policy (CSP) would have stopped this in it’s tracks. The fact that none of these brands cares enough about security or their customers to even have the most basic protections in place is abhorrent

    Here’s a funny trick: if you open Google Chrome and use Lighthouse on Google’s own websites (YouTube, Gmail, etc), they fail their own best practices tests. I wish I were kidding

    • Tehhund@lemmy.world
      link
      fedilink
      English
      arrow-up
      2
      ·
      2 hours ago

      This is an area I don’t know much about: how would CSP have helped in this case?

      • Zarobi@aussie.zone
        link
        fedilink
        English
        arrow-up
        2
        ·
        2 hours ago

        It is a set of rules for the website, outlining what domains are allowed to do various activities on the page after loading. For example: you can configure it to prevent inline <script> tags, only allow xyz domains to load scripts, and only allow network requests to xyz hosts. This configuration would prevent this from doing anything at all - there would just be errors in the console when the malware attempts to create the malicious script tags.

        Most websites don’t bother because it’s mildly inconvenient for the developer to have to whitelist things all the time, and many js libraries are poorly written and will fail to work with this configuration. For example many advertising and tracking libraries (including the one from the article) specifically tell people to enable “unsafe-inline” and “unsafe-eval”. Like it literally has unsafe in the name lol