What I want to focus on is mental model of your CI pipeline, and problem with too much YAML, consider this quote: > Cache scope is per-repo, shared across pull_request_target runs (which use the base repo's cache scope) and pushes to main. A PR running in the base repo's cache scope can poison entries that production workflows on main will later restore. This is very difficult to understand, and teach to new people,…
The other advantage with bash is that most developers can run it locally to validate what it is doing and debug issues. With GitHub Actions you need to always commit and push, slowing down the DX.
Postmortem: TanStack NPM supply-chain compromise
481–490 of 501 posts
Re: Postmortem: TanStack NPM supply-chain compromise
#482> Unpublish was unavailable for nearly all affected packages because of npm's "no unpublish if dependents exist" policy. We have to rely on npm security to pull tarballs server-side, which adds hours of delay during which malicious tarballs remain installable Per https://docs.npmjs.com/policies/unpublish : > If your package does not meet the unpublish policy criteria, we recommend deprecating the package. This allows…
I do not envy the position the npm team are in. They removed the ability to unpublish packages as a response to the left-pad incident[1] because it wasn't desirable for individual developers to break downstream dependencies by pulling their package maliciously. Of course the side effect is that now it's much harder to pull packages for legitimate reasons :/ [1] https://en.wikipedia.org/wiki/Npm_left-pad_incident
isn't that pretty great?
Because now you have learnt that you can't trust them
Re: Postmortem: TanStack NPM supply-chain compromise
#483> Unpublish was unavailable for nearly all affected packages because of npm's "no unpublish if dependents exist" policy. We have to rely on npm security to pull tarballs server-side, which adds hours of delay during which malicious tarballs remain installable Per https://docs.npmjs.com/policies/unpublish : > If your package does not meet the unpublish policy criteria, we recommend deprecating the package. This allows…
Some sort of middle ground should have been found where the unpublished package is still accessible as an archive or something. I'd much rather get my package broken than get hacked
Re: Postmortem: TanStack NPM supply-chain compromise
#484What do folks here do to avoid having plaintext credentials on disk? I try to use 1Password's plugins where I can. I find the SSH key (and got signing) experience flawless, but the cli experience (eg aws cli) pretty clunky - they often break, and they don't even have a gcp plugin last I checked.
Re: Postmortem: TanStack NPM supply-chain compromise
#485Earlier quoted context omitted.
I'm not a huge fan of 1Password, there have been way too many issues in the past with it. If you're on a Mac, I can highly recommend you to check out Secretive https://github.com/maxgoedjen/secretive
Love that feeling when you read through a repo and think, "Wow, this looks cool," and go to star it, and see that you already have, and clearly forgot about it Anyway, thanks for sharing. It doesn't look like it handles cli auth though (aws, npm, etc. all leave tokens sitting in your home directory). What do you use for those?
Re: Postmortem: TanStack NPM supply-chain compromise
#486Earlier quoted context omitted.
Always run third-party code (especially npm packages) inside a sandbox, take your pick: ai-jail, bubblewrap, seatbelt, or amazing-sandbox (the last one, I wrote for myself after trying all others).
Bubblewrap doesn't help with protecting DBus bus (and you can do a lot with unrestricted access to DBus), accessing the GPU, Wayland and audio daemon. It cannot protect /proc and /sys filesystems. So it works only for simplest CLI programs. As I remember, some Node.js utility (maybe npm) had a bug where it hang if there were no /proc filesystem because it couldn't figure out how many CPUs are available. Telegram cras…
I use it every day for CLI tools
> How would you sandbox an Electron app
I haven't figured that out yet
Re: Postmortem: TanStack NPM supply-chain compromise
#487Earlier quoted context omitted.
It should be a way to make system env vars (profile.d or simlar) as readonly so every users' shell had these set to empty values and unable to change them.
Shell-only, but https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V...
Re: Postmortem: TanStack NPM supply-chain compromise
#488Earlier quoted context omitted.
Anything that can be modified by an attacker can not be used to secure the sudo command. This is a recursive requirementor hierarchy for secure systems.
You can set the permissions so that the attacker can't modify it?
Like, sure you could, but you end up with a very useless system.
Easier to just use VMs for each security context.
Re: Postmortem: TanStack NPM supply-chain compromise
#489Earlier quoted context omitted.
You can set the permissions so that the attacker can't modify it?
You would need to prevent an attacker from installing shell aliases, or shell config files, or altering any binaries in PATH. Like, sure you could, but you end up with a very useless system. Easier to just use VMs for each security context.