▲ | apimade 3 days ago | |||||||||||||
Here’s a one-liner for node devs on MacOS, pin your versions and manually update your supply chain until your tooling supports supply chain vetting, or at least some level of protection against instantly-updated malicious upstream packages. Would love to see some default-secure package management / repo options. Even a 24 hour delayed mirror would be better than than what we have today. find . -name package.json -not -path "/node_modules/" -exec sh -c ' for pkg; do lock="$(dirname "$pkg")/package-lock.json" [ -f "$lock" ] || continue tmp="$(mktemp)" jq --argfile lock "$lock" \ ".dependencies |= with_entries(.value = $lock.dependencies[.key].version) | .devDependencies |= with_entries(.value = $lock.dependencies[.key].version // $lock.devDependencies[.key].version)" \ "$pkg" > "$tmp" && mv "$tmp" "$pkg" done ' sh {} + | ||||||||||||||
▲ | treyd 3 days ago | parent | next [-] | |||||||||||||
The expected secure workflow should not require an elaborate bash incantation, it should be the workflow the tools naturally encourage you to use organically. "You're holding it wrong" cannot be possible. | ||||||||||||||
▲ | madeofpalk 3 days ago | parent | prev | next [-] | |||||||||||||
? Package lock files from npm/yarn/pnpm automatically lock all your dependencies (including transitive deps) What does this actually achieve? | ||||||||||||||
| ||||||||||||||
▲ | simonw 3 days ago | parent | prev | next [-] | |||||||||||||
You can indent every line of a code block on Hacker News by two spaces to have it render as code.
| ||||||||||||||
▲ | 3 days ago | parent | prev [-] | |||||||||||||
[deleted] |