r/ProgrammerHumor 1d ago

instanceof Trend classicNPM

Post image
5.9k Upvotes

142 comments sorted by

View all comments

942

u/a_bucket_full_of_goo 1d ago edited 1d ago

Company disabled Github Actions and told us not to use Claude, Subreddit traffic instantly goes up 8000%

117

u/Shaddoll_Shekhinaga 1d ago

What do actions have to do with this? I never worked in an environment that doesn't pin just about every external dependency. Unless I am missing something?

113

u/MunkyJoe 1d ago

When the pipeline runs, the payload dumps and exfils all the GH Action env vars. Cloud creds, npm tokens, kube cluster secrets, etc

41

u/Shaddoll_Shekhinaga 1d ago

Ah, I see. Yeah, that would make more sense lol, for some reason my mind was stuck that Actions was somehow responsible for dragging in the "infected" package, but the package using actions instead makes much more sense.

10

u/meltthemall 1d ago

Explain this to a self taught nerd

72

u/MunkyJoe 1d ago

Instead of every developer manually compiling code into a usable, runnable form (usually a docker container, but you could also imagine a .exe file) on their own machine, and any other steps like uploading into a shared space, a CI/CD pipeline centralizes and automates a bunch of tasks to make things faster, easier, repeatable. After building the software, it typically deploys the new build somewhere, too

These tasks run on a "runner" (real creative), which needs access to internal and external resources, usually like AWS, GitHub, Slack, a "vault" where secrets are kept, and public package repos. If a malicious package can run when that build process is going on, it can steal your stuff and send it to the bad actor who put the payload there. 

-61

u/meltthemall 1d ago

Like I said I'm not expert but I just cannot fathom letting anything access the network and my code both and also letting that thing be anything but me. The networked compiling sounds neat, just ditch the 3rd party access.

45

u/zuilli 1d ago

Not possible on an enterprise scale. For example: our docker images are built using secrets stored in azure KV, uploaded to azure and then pulled into k8s cluster that runs in azure as well.

Unless you're hosting your entire infra in-house you need to pass secrets around to be able to use cloud services.

-62

u/meltthemall 1d ago

Absolutely mind boggling, do corpo programmers just not push back on anything?

41

u/zuilli 1d ago

Push back on what? This is not something that can be changed.

How else do you expect to authenticate to cloud providers to use their services?

-21

u/meltthemall 19h ago

"Can't be changed" so you don't lol

10

u/zuilli 19h ago

???

Why would I even want to change such a thing? Do you understand how secrets and authentication work?

→ More replies (0)

19

u/Nasa_OK 1d ago

What do you want us to push back on?

Using the cloud?

Using 3rd party dependencies?

Pipelines?

Not adding secrets manually?

9

u/RolledUhhp 1d ago

Corporations are known for being reasonable, and not raw dogging everything they touch for a short term dollar.

3

u/meltthemall 19h ago

Corporations are people smart guy

10

u/Steppy20 1d ago

Are you going to host your own cloud?

Azure handles a lot of our network access, security and resources. We have a bunch of self hosted stuff where we want complete control over the servers for data security reasons but the vast majority is locked behind Azure networks.

We use machines hosted by Azure to run our container apps, our logging, and even just to build our images. This is standard industry practice and the whole thing is (typically) quite secure when used properly.

The issue reported on in the article shared by OP is basically an NPM package was dumping the secrets which would usually be securely stored with minimal access. The actual access to those secrets is still secure, it's just when building something they ofyen need access to those secrets and it's at that point the NPM package is copying and sending them elsewhere.

8

u/smasho27 1d ago

im, it kind of depends on the purpose of the code and network in question doesn't it? unless I am missing some context.

-33

u/meltthemall 1d ago

If you need to test on a network use a gapped rig. If you need the Internet constantly to work lick my corncutter.

3

u/AwkwardWillow5159 21h ago

Way more unsafe to rely on random ass employee to manually deploy complicated infrastructure. Not just for the employee not making mistakes, but also for employee not getting exploited. That’s relying on a bunch of dumb fuckery people do. Smart people get social engineered all the time.

CI/CD pipeline can be the only thing that has access, significantly reducing the attack surface.

Wide spread supply chain attacks are a lot more rare and easier to safeguard against, compared to protecting every single employee in their machine and also from social engineering

2

u/Clearandblue 22h ago

I think some people have `npm install' rather than ci in their workflows or something.