I’ll go ahead and make an assumption that the Chinese government was involved. Countries badly need to figure out a way to punish bad actors in cybersecurity realms. It seems that this type of attack, along with many others, are quickly ramping up. If there isn’t competent policy in this area, it could become very dangerous.
Polyfill supply chain attack hits 100K+ sites
251–260 of 387 posts
Re: Polyfill supply chain attack hits 100K+ sites
#252Software supply chains feel like one of the Internet's last remaining high-trust spaces, and I don't think that's going to last long. A tidal wave of this is coming. I'm kind of surprised it's taken this long given how unbelievably soft this underbelly is.
going back to rolling it yourself, or relying on a few high quality stdlib providers that you likely have to pay for.
Re: Polyfill supply chain attack hits 100K+ sites
#253start projects with Content-Security-Policy: default-src 'self'; then add narrow, individually justified exceptions.
That wouldn't have helped here. Anyone adding CSPs would have had polyfill.io as permitted... which allowed this attack.
- do we have a trust relationship with the vendor - is it strictly required - what are the alternatives - blast radius
Adding script-src has a pretty high blast-radius. There is no relationship with an unpaid CDN. Alternatives can be vendoring a static polyfill script, or just fixing a few functions manually, depending on desired level of browser support.
So it would not have passed.
Adding an exception for 3rd-party images would have to clear a much lower bar for example but even there GDPR or information leakage could be a concern.
CSP changes are just a great point to stop and think about how the frontend interacts with the rest of the world. If you just rubber-stamp everything then of course it wouldn't have any effect.
Re: Polyfill supply chain attack hits 100K+ sites
#254Game theory at work? Someone needs to maintain legacy code for free that hosts thousands of sites and gets nothing but trouble (pride?) in return. Meanwhile the forces of the world present riches and power in return to turn to the dark side (or maybe just letting your domain lapse and doing something else). If security means every maintainer of every OSS package you use has to be scrupulous, tireless, and not screw u…
I believe tea, the replacement for homebrew, is positioning itself as a solution to this but I rarely see it mentioned here https://tea.xyz/
Re: Polyfill supply chain attack hits 100K+ sites
#255Re: Polyfill supply chain attack hits 100K+ sites
#256Earlier quoted context omitted.
Sure, but why risk a developer making a typo, saying integrty="sha384-whatever", and that attribute simply being ignored in the html?
“A developer could typo something” is kind of weak because you could use this argument for basically anything.
In a lot of situations the system can be designed that a mistake has to be obvious at review for it to even pass the build step. Why not strive for that level of robustness?
Re: Polyfill supply chain attack hits 100K+ sites
#257Earlier quoted context omitted.
Alternatively, if you rely on some code then download a specific version and check it before using it. Report any problems found. This makes usage robust and supports open source support and development.
I guess that would work if new exploits weren’t created or discovered. Otherwise all your plan to “run old software” is questionable.
Re: Polyfill supply chain attack hits 100K+ sites
#258It's amazing to me that anyone who tried to go to a website, then was redirected to an online sports betting site instead of the site they wanted to go to, would be like "hmm, better do some sports gambling instead, and hey this looks like just the website for me". This sort of thing must work on some percentage of people, but it's disappointing how much of a rube you'd have to be to fall for it.
Assuming the user opened the website and didn't notice the redirect (this is more common in mobile), then forgot about it and when they opened their browser again a few days later, their favorite gambling website was waiting for them, and proceeded to gamble as they usually do.
Re: Polyfill supply chain attack hits 100K+ sites
#259Earlier quoted context omitted.
Real solution? We’re in a complexity crisis and almost no one sees it. It’s not just software dependencies of course. It’s everything almost everywhere. No joke, the Amish have a point. They were just a few hundred years too early.
I 100% agree. I feel a huge part of my responsibility as a software "engineer" is to manage complexity. But i feel i'm fighting a losing battle, most everyone seems to pull in the opposite direction. Complexity increases your surface area for bugs to hide in. I've come to the conclusion it's tragedy-of-the-commons incentives: People get promotions for complex and clever work, so they do it, at the cost of a more-comp…
We need thinner faster lighter leaner on everything… because IDK why, MBAs have decided that reliability will just not sell.
Re: Polyfill supply chain attack hits 100K+ sites
#260Game theory at work? Someone needs to maintain legacy code for free that hosts thousands of sites and gets nothing but trouble (pride?) in return. Meanwhile the forces of the world present riches and power in return to turn to the dark side (or maybe just letting your domain lapse and doing something else). If security means every maintainer of every OSS package you use has to be scrupulous, tireless, and not screw u…
in a strange way, this almost makes the behavior of hopping onto every new framework rational. The older and less relevant the framework, the more the owner's starry-eyed enthusiasm wears off. The hope that bigcorp will pay $X million for the work starts to fade. The tedium of bug fixes and maintenance wears on, the game theory takes it's toll. The only rational choice for library users is to jump ship once the numbe…
Or maybe not doing that and just using native browser APIs? Many of these frameworks are overkill and having so many "new" ones just makes the situation worse.