A place to cache linked articles (think custom and personal wayback machine)
Du kannst nicht mehr als 25 Themen auswählen Themen müssen mit entweder einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

index.html 16KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228
  1. <!doctype html><!-- This is a valid HTML5 document. -->
  2. <!-- Screen readers, SEO, extensions and so on. -->
  3. <html lang="en">
  4. <!-- Has to be within the first 1024 bytes, hence before the `title` element
  5. See: https://www.w3.org/TR/2012/CR-html5-20121217/document-metadata.html#charset -->
  6. <meta charset="utf-8">
  7. <!-- Why no `X-UA-Compatible` meta: https://stackoverflow.com/a/6771584 -->
  8. <!-- The viewport meta is quite crowded and we are responsible for that.
  9. See: https://codepen.io/tigt/post/meta-viewport-for-2015 -->
  10. <meta name="viewport" content="width=device-width,initial-scale=1">
  11. <!-- Required to make a valid HTML5 document. -->
  12. <title>When “Everything” Becomes Too Much: The npm Package Chaos of 2024 (archive) — David Larlet</title>
  13. <meta name="description" content="Publication mise en cache pour en conserver une trace.">
  14. <!-- That good ol' feed, subscribe :). -->
  15. <link rel="alternate" type="application/atom+xml" title="Feed" href="/david/log/">
  16. <!-- Generated from https://realfavicongenerator.net/ such a mess. -->
  17. <link rel="apple-touch-icon" sizes="180x180" href="/static/david/icons2/apple-touch-icon.png">
  18. <link rel="icon" type="image/png" sizes="32x32" href="/static/david/icons2/favicon-32x32.png">
  19. <link rel="icon" type="image/png" sizes="16x16" href="/static/david/icons2/favicon-16x16.png">
  20. <link rel="manifest" href="/static/david/icons2/site.webmanifest">
  21. <link rel="mask-icon" href="/static/david/icons2/safari-pinned-tab.svg" color="#07486c">
  22. <link rel="shortcut icon" href="/static/david/icons2/favicon.ico">
  23. <meta name="msapplication-TileColor" content="#f7f7f7">
  24. <meta name="msapplication-config" content="/static/david/icons2/browserconfig.xml">
  25. <meta name="theme-color" content="#f7f7f7" media="(prefers-color-scheme: light)">
  26. <meta name="theme-color" content="#272727" media="(prefers-color-scheme: dark)">
  27. <!-- Is that even respected? Retrospectively? What a shAItshow…
  28. https://neil-clarke.com/block-the-bots-that-feed-ai-models-by-scraping-your-website/ -->
  29. <meta name="robots" content="noai, noimageai">
  30. <!-- Documented, feel free to shoot an email. -->
  31. <link rel="stylesheet" href="/static/david/css/style_2021-01-20.css">
  32. <!-- See https://www.zachleat.com/web/comprehensive-webfonts/ for the trade-off. -->
  33. <link rel="preload" href="/static/david/css/fonts/triplicate_t4_poly_regular.woff2" as="font" type="font/woff2" media="(prefers-color-scheme: light), (prefers-color-scheme: no-preference)" crossorigin>
  34. <link rel="preload" href="/static/david/css/fonts/triplicate_t4_poly_bold.woff2" as="font" type="font/woff2" media="(prefers-color-scheme: light), (prefers-color-scheme: no-preference)" crossorigin>
  35. <link rel="preload" href="/static/david/css/fonts/triplicate_t4_poly_italic.woff2" as="font" type="font/woff2" media="(prefers-color-scheme: light), (prefers-color-scheme: no-preference)" crossorigin>
  36. <link rel="preload" href="/static/david/css/fonts/triplicate_t3_regular.woff2" as="font" type="font/woff2" media="(prefers-color-scheme: dark)" crossorigin>
  37. <link rel="preload" href="/static/david/css/fonts/triplicate_t3_bold.woff2" as="font" type="font/woff2" media="(prefers-color-scheme: dark)" crossorigin>
  38. <link rel="preload" href="/static/david/css/fonts/triplicate_t3_italic.woff2" as="font" type="font/woff2" media="(prefers-color-scheme: dark)" crossorigin>
  39. <script>
  40. function toggleTheme(themeName) {
  41. document.documentElement.classList.toggle(
  42. 'forced-dark',
  43. themeName === 'dark'
  44. )
  45. document.documentElement.classList.toggle(
  46. 'forced-light',
  47. themeName === 'light'
  48. )
  49. }
  50. const selectedTheme = localStorage.getItem('theme')
  51. if (selectedTheme !== 'undefined') {
  52. toggleTheme(selectedTheme)
  53. }
  54. </script>
  55. <meta name="robots" content="noindex, nofollow">
  56. <meta content="origin-when-cross-origin" name="referrer">
  57. <!-- Canonical URL for SEO purposes -->
  58. <link rel="canonical" href="https://socket.dev/blog/when-everything-becomes-too-much">
  59. <body class="remarkdown h1-underline h2-underline h3-underline em-underscore hr-center ul-star pre-tick" data-instant-intensity="viewport-all">
  60. <article>
  61. <header>
  62. <h1>When “Everything” Becomes Too Much: The npm Package Chaos of 2024</h1>
  63. </header>
  64. <nav>
  65. <p class="center">
  66. <a href="/david/" title="Aller à l’accueil"><svg class="icon icon-home">
  67. <use xlink:href="/static/david/icons2/symbol-defs-2021-12.svg#icon-home"></use>
  68. </svg> Accueil</a> •
  69. <a href="https://socket.dev/blog/when-everything-becomes-too-much" title="Lien vers le contenu original">Source originale</a>
  70. <br>
  71. Mis en cache le 2024-01-09
  72. </p>
  73. </nav>
  74. <hr>
  75. <p>Happy 2024, folks! Just when we thought we'd seen it all, an npm user named PatrickJS, aka <a class="chakra-link css-pmuo56" href="https://socket.dev/npm/user/gdi2290">gdi2290</a>, threw us a curveball. He (<a target="_blank" rel="noopener noreferrer" class="chakra-link css-pmuo56" href="https://uncenter.dev/posts/npm-install-everything/">along with a group of contributors</a>) kicked off the year with a bang, launching a troll campaign that uploaded an npm package aptly named <a class="chakra-link css-pmuo56" href="https://socket.dev/npm/package/everything"><code>everything</code></a>. This package, true to its name, depends on every other public npm package, creating millions of transitive dependencies.</p>
  76. <h3>The Chaos Unleashed</h3>
  77. <p>The <code>everything</code> package and its 3,000+ sub-packages have caused a <a class="chakra-link css-pmuo56" href="https://socket.dev/glossary/denial-of-service-dos">Denial of Service (DOS)</a> for anyone who installs it. We're talking about storage space running out and system resource exhaustion.</p>
  78. <p>But that's not all. The creator took their prank to the next level by setting up http://everything.npm.lol, showcasing the chaos they unleashed. They even included a meme from Skyrim, adding some humor (or mockery, depending on your perspective) to the situation.</p>
  79. <h4><code>everything</code>'s <code>package.json</code> file</h4>
  80. <pre class="css-1nw4yob"><code class="chakra-code css-y2ougk" lang="json">{
  81. "name": "everything",
  82. "version": "3.0.0",
  83. "description": "npm install everything",
  84. "main": "index.js",
  85. "contributors": [
  86. "PatrickJS &lt;github@patrickjs.com&gt;",
  87. "uncenter &lt;hi@uncenter.dev&gt;",
  88. "ChatGPT &lt;chatgpt@openai.com&gt;",
  89. "trash &lt;trash@trash.dev&gt;",
  90. "Hacksore &lt;sean@boult.me&gt;"
  91. ],
  92. "scripts": {},
  93. "keywords": [
  94. "everything",
  95. "allthethings",
  96. "everymodule"
  97. ],
  98. "license": "MIT",
  99. "homepage": "https://github.com/everything-registry/everything",
  100. "repository": {
  101. "type": "git",
  102. "url": "git+https://github.com/everything-registry/everything.git"
  103. },
  104. "dependencies": {
  105. "@everything-registry/chunk-0": "0.1.0",
  106. "@everything-registry/chunk-1": "0.1.0",
  107. "@everything-registry/chunk-2": "0.1.0",
  108. "@everything-registry/chunk-3": "0.1.0",
  109. "@everything-registry/chunk-4": "0.1.0"
  110. }
  111. }</code></pre>
  112. <h3>Echoes of the Past</h3>
  113. <p>This isn't the first time we've seen such a stunt. Last year, the <a class="chakra-link css-pmuo56" href="https://socket.dev/npm/package/no-one-left-behind/overview/2018.2.10"><code>no-one-left-behind</code></a> package by <a class="chakra-link css-pmuo56" href="https://socket.dev/npm/user/zalastax">Zalastax</a> attempted something similar. It was removed, but then reemerged under a different scope with over 33,000 sub-packages. It's like playing whack-a-mole with npm packages!</p>
  114. <p>It’s also reminiscent of a package called “hoarders” that used to directly depend on every module on npm (approximately 20,000 in 2012). It was published by software engineer Josh Holbrook, created to be “node.js's most complete utility grab bag.”</p>
  115. <p>In an effort to maintain a secure and reliable ecosystem for JavaScript developers, <a target="_blank" rel="noopener noreferrer" class="chakra-link css-pmuo56" href="https://github.com/jfhbrook/hoarders#history">hoarders was effectively “cancelled”</a> by Isaac Schlueter (creator of the npm package manager) after a year, due to the strain it caused on the registry's database.</p>
  116. <h3>Unintended Consequences</h3>
  117. <p>The "everything" package, with its 5 sub-packages and thousands of dependencies, has essentially locked down the ability for authors to unpublish their packages. This situation is due to npm's policy shift following the infamous <a target="_blank" rel="noopener noreferrer" class="chakra-link css-pmuo56" href="https://qz.com/646467/how-one-programmer-broke-the-internet-by-deleting-a-tiny-piece-of-code">"left-pad" incident in 2016</a>, where a popular package <a class="chakra-link css-pmuo56" href="https://socket.dev/npm/package/left-pad"><code>left-pad</code></a> was removed, grinding development to a halt across much of the developer world. In response, npm tightened its <a target="_blank" rel="noopener noreferrer" class="chakra-link css-pmuo56" href="https://docs.npmjs.com/policies/unpublish">rules around unpublishing</a>, specifically preventing the unpublishing of any package that is used by another package.</p>
  118. <p>Ironically, this policy trapped PatrickJS in his own web. Upon realizing the impact of his prank, he attempted to remove the <code>everything</code> package but was unable to do so. He reached out to the npm support team for help, but the damage was done.</p>
  119. <p>PatrickJS wrote this apology on GitHub in a <a target="_blank" rel="noopener noreferrer" class="chakra-link css-pmuo56" href="https://github.com/everything-registry/everything/issues/17">since-removed GitHub issue</a>:</p>
  120. <blockquote>Hi all! First, just want to apologize about any difficulties this package has caused. We are working to resolve the issues and we have contacted NPM regarding support with this matter (see below). We appreciate your patience.<br><br>The major issue here is that when a package depends on another package at a specific version, that version cannot be unpublished. We've since realized there is an issue with "star" versions - a.k.a depending on any/all versions of another package ( "package-xyz": "*" ) - any version of that package is now unable to unpublish. As I previously mentioned, we've reached out to npm and are hoping they can either A) allow folks to unpublish when the packages that depend on them use a "star" version, B) not permit star versions in published packages going forward, or as a last resort, C) remove our npm organization entirely (and remove all of the packages that are blocking unpublishing). As far as we can tell, there is simply nothing we can do on our own - we can't unpublish the packages ourselves (because other packages depend on them) and publishing a new version over them doesn't change anything.</blockquote>
  121. <p>However, we now see that while <code>everything</code> remains on the registry, the <code>@everything-registry</code> scoped packages have been made private, potentially offering a resolution.</p>
  122. <h3>The Ripple Effect</h3>
  123. <p>This whole saga is more than just a digital prank. It highlights the <a class="chakra-link css-pmuo56" href="https://socket.dev/blog/inside-node-modules">ongoing challenges</a> in package management within the npm ecosystem. For developers, it's a reminder of the cascading effects of dependencies and the importance of mindful package creation, maintenance, and consumption.</p>
  124. <p><img alt=" " loading="lazy" src="https://cdn.sanity.io/images/cgdhsj6q/production/14461d25dd2f7a1cf456a840fe3bc1e98670e3e0-2162x1902.png?w=1600&amp;fit=max&amp;auto=format">
  125. <p>As we navigate the open source world, incidents like the <code>everything</code> package remind us of the delicate balance between freedom and responsibility in open-source software.</p></p>
  126. <p>Install <a class="chakra-link css-pmuo56" href="https://socket.dev/github-app">Socket for GitHub</a> to stay secure this year, and let's see what the rest of 2024 has in store for us!</p>
  127. </article>
  128. <hr>
  129. <footer>
  130. <p>
  131. <a href="/david/" title="Aller à l’accueil"><svg class="icon icon-home">
  132. <use xlink:href="/static/david/icons2/symbol-defs-2021-12.svg#icon-home"></use>
  133. </svg> Accueil</a> •
  134. <a href="/david/log/" title="Accès au flux RSS"><svg class="icon icon-rss2">
  135. <use xlink:href="/static/david/icons2/symbol-defs-2021-12.svg#icon-rss2"></use>
  136. </svg> Suivre</a> •
  137. <a href="http://larlet.com" title="Go to my English profile" data-instant><svg class="icon icon-user-tie">
  138. <use xlink:href="/static/david/icons2/symbol-defs-2021-12.svg#icon-user-tie"></use>
  139. </svg> Pro</a> •
  140. <a href="mailto:david%40larlet.fr" title="Envoyer un courriel"><svg class="icon icon-mail">
  141. <use xlink:href="/static/david/icons2/symbol-defs-2021-12.svg#icon-mail"></use>
  142. </svg> Email</a> •
  143. <abbr class="nowrap" title="Hébergeur : Alwaysdata, 62 rue Tiquetonne 75002 Paris, +33184162340"><svg class="icon icon-hammer2">
  144. <use xlink:href="/static/david/icons2/symbol-defs-2021-12.svg#icon-hammer2"></use>
  145. </svg> Légal</abbr>
  146. </p>
  147. <template id="theme-selector">
  148. <form>
  149. <fieldset>
  150. <legend><svg class="icon icon-brightness-contrast">
  151. <use xlink:href="/static/david/icons2/symbol-defs-2021-12.svg#icon-brightness-contrast"></use>
  152. </svg> Thème</legend>
  153. <label>
  154. <input type="radio" value="auto" name="chosen-color-scheme" checked> Auto
  155. </label>
  156. <label>
  157. <input type="radio" value="dark" name="chosen-color-scheme"> Foncé
  158. </label>
  159. <label>
  160. <input type="radio" value="light" name="chosen-color-scheme"> Clair
  161. </label>
  162. </fieldset>
  163. </form>
  164. </template>
  165. </footer>
  166. <script src="/static/david/js/instantpage-5.1.0.min.js" type="module"></script>
  167. <script>
  168. function loadThemeForm(templateName) {
  169. const themeSelectorTemplate = document.querySelector(templateName)
  170. const form = themeSelectorTemplate.content.firstElementChild
  171. themeSelectorTemplate.replaceWith(form)
  172. form.addEventListener('change', (e) => {
  173. const chosenColorScheme = e.target.value
  174. localStorage.setItem('theme', chosenColorScheme)
  175. toggleTheme(chosenColorScheme)
  176. })
  177. const selectedTheme = localStorage.getItem('theme')
  178. if (selectedTheme && selectedTheme !== 'undefined') {
  179. form.querySelector(`[value="${selectedTheme}"]`).checked = true
  180. }
  181. }
  182. const prefersColorSchemeDark = '(prefers-color-scheme: dark)'
  183. window.addEventListener('load', () => {
  184. let hasDarkRules = false
  185. for (const styleSheet of Array.from(document.styleSheets)) {
  186. let mediaRules = []
  187. for (const cssRule of styleSheet.cssRules) {
  188. if (cssRule.type !== CSSRule.MEDIA_RULE) {
  189. continue
  190. }
  191. // WARNING: Safari does not have/supports `conditionText`.
  192. if (cssRule.conditionText) {
  193. if (cssRule.conditionText !== prefersColorSchemeDark) {
  194. continue
  195. }
  196. } else {
  197. if (cssRule.cssText.startsWith(prefersColorSchemeDark)) {
  198. continue
  199. }
  200. }
  201. mediaRules = mediaRules.concat(Array.from(cssRule.cssRules))
  202. }
  203. // WARNING: do not try to insert a Rule to a styleSheet you are
  204. // currently iterating on, otherwise the browser will be stuck
  205. // in a infinite loop…
  206. for (const mediaRule of mediaRules) {
  207. styleSheet.insertRule(mediaRule.cssText)
  208. hasDarkRules = true
  209. }
  210. }
  211. if (hasDarkRules) {
  212. loadThemeForm('#theme-selector')
  213. }
  214. })
  215. </script>
  216. </body>
  217. </html>