Hacker Newsnew | past | comments | ask | show | jobs | submit | tabwidth's commentslogin

Even the meta version is picky about where it goes. The whole declaration has to fit inside the first 1024 bytes. Easy to break with a giant comment at the top.


Replaced Shiki on a docs site, grammar pack was bigger than the rest of the JS. 2KB for color-only feels like a fair trade.


Other side of that though, touch the bottom of a stack and every layer above it re-runs. Stack unwinding, basically.


Most of the malicious ones just curl something in a postinstall script, scanners already catch that. The sneaky ones don't look malicious until they run, and three days may not help.


There are plenty of ways to notice a malicious release without observing it running.

Build provenance, maintainer alerts on new releases, tying releases to specific git tags, etc all help.


Every single one now will be more sneaky, and we’ll be operating on a 3-day cooldown for no reason.


How exactly does that work?

I don't think that HNers understand the recent supply chain attacks very well at all. I also don't think they realize the tests the SCA/package providers do to all the major packages.

Almost all these attacks try to reach out to external sites to steal your data. That is exceptionally hard to hide in any meaningful way.


That’s a bold claim to make about HNers. Au contraire, security companies have absolutely missed supply chain attacks.

Example:

https://snyk.io/blog/node-gyp-supply-chain-compromise-self-p...

Before that we had event-stream, then we had XZ compromise.

It’s not exceptionally hard to delay reaching out to external sites until after a cooldown period.


    def steal_your_data():
      if datetime.now() < three_days_after_attack:
        return
      reach_out_to_external_sites()


OK, so it looks like you've still added suspicious code to your package.


You can make it much less suspicious. In particular, if you can compromise the package publishing process, and not just pushes to main, you can add your malicious code to binary artifacts, not to the source code.


You really think it has zero benefit whatsoever? Nothing malicious will be caught?


Pretty much. These tools are effective now only because the malware doesn’t have to avoid being detected at all to be successful.


Build tooling still runs though. Your bundler plugin or PostCSS transform gets full fs access at build time, nobody's auditing that.


Build deps are even disregarded as less critical than runtime deps traditionally. So deps like sphynx for building docs are still a dev side supply chain vector.

https://github.com/kennethreitz/pytheory/issues/47

The reason this may be overlooked is because build deps are only ran by the devs, but not the users, so users dismiss it as safe. However, if a build dep is infected, the infection may spread to the actual package code, which will then of course be run by the user.

Not theoretical, Microsoft is currently under attack by a worm that spreads through vs code extensions, which then spread to actual packages that users run.


It may depend on the runtime giving you a sync wait that doesn't deadlock the loop you came from. In JS you just can't. `dontawait` would need V8 to be a different VM.


The box itself is probably fine. It's the path between you and it. In shared infrastructure one compromised hop somewhere upstream is enough and now you're SSHing into the wrong thing without realizing it.


Reviewing isn't hard when the diff is what you asked for. It's when you asked for a one-line fix and get back 40 changed lines across four files. At that point you're not even reviewing your change anymore, you're auditing theirs.


Half the time I just grep the ticket key in Slack because it's faster than using Jira's own search.


This isn't really about centralization. ISPs are blocking at the IP level, not Docker Hub specifically. You could self-host a registry behind Cloudflare and still run into the same thing.


Self-hosting a registry is objectively “less bad” than relying entirely on docker hub but, unless all your Dockerfiles start with `FROM scratch` you’ll still need access to Docker Hub to pull the base images and their updates, and that’s true regardless of how many people are running their own registries. If instead of relying on a centralized registry, which just so happens to also depend on a centralized CDN, you could instead pull images using something like IPFS or even torrent, not only ISP IP banlists wouldn’t be an issue but you would also eliminate a whole bunch of failure modes from the system.


I posted another comment[0] about this, but if you already have the images locally then you can push them directly to the target server without needing a separate registry.

[0]: https://news.ycombinator.com/item?id=47750927


"Behind Cloudflare" is the centralisation part


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: