{"id":182580,"date":"2026-07-09T22:53:44","date_gmt":"2026-07-09T20:53:44","guid":{"rendered":"https:\/\/prohoster.info\/blog\/novosti-interneta\/v-npm-12-0-po-umolchaniyu-otklyuchyon-zapusk-skriptov-pri-ustanovke-paketov"},"modified":"2026-07-09T22:53:44","modified_gmt":"2026-07-09T20:53:44","slug":"v-npm-12-0-po-umolchaniyu-otklyuchyon-zapusk-skriptov-pri-ustanovke-paketov","status":"publish","type":"post","link":"https:\/\/prohoster.info\/es\/blog\/news\/v-npm-12-0-po-umolchaniyu-otklyuchyon-zapusk-skriptov-pri-ustanovke-paketov","title":{"rendered":"En NPM 12.0, de forma predeterminada se desactiva la ejecuci\u00f3n de scripts al instalar paquetes","gt_translate_keys":[{"key":"rendered","format":"text"}]},"content":{"rendered":"<p>Se ha publicado la versi\u00f3n 12.0 del gestor de paquetes NPM, que se incluye en la distribuci\u00f3n de Node.js y se utiliza para la distribuci\u00f3n de m\u00f3dulos en JavaScript. Esta nueva versi\u00f3n es notable por la desactivaci\u00f3n predeterminada de la ejecuci\u00f3n de scripts durante la instalaci\u00f3n de paquetes. Se espera que este cambio complique la realizaci\u00f3n de ataques a trav\u00e9s de la compromisi\u00f3n de dependencias y ralentice la propagaci\u00f3n de gusanos activados desde scripts de instalaci\u00f3n.    <\/p>\n<p>Para prohibir el autostart de scripts especificados en package.json a trav\u00e9s de los par\u00e1metros preinstall, install o postinstall, la configuraci\u00f3n allowScripts se establece por defecto en \"off\". La ejecuci\u00f3n de tales scripts, as\u00ed como la compilaci\u00f3n de c\u00f3digo C\/C++ con la herramienta node-gyp cuando hay un archivo binding.gyp en el paquete, ahora solo se realiza tras recibir una instrucci\u00f3n expl\u00edcita del usuario. Adem\u00e1s, los par\u00e1metros \"--allow-git\" y \"--allow-remote\" ahora se establecen por defecto en \"none\", lo que desactiva la descarga autom\u00e1tica de dependencias desde repositorios de Git y enlaces directos a sitios con archivos tar.    <\/p>\n<p>Para organizar la ejecuci\u00f3n de scripts de instalaci\u00f3n se debe usar el comando \"npm approve-scripts\", al que se le pasan como argumento los nombres de los paquetes de confianza, o la opci\u00f3n \"--all\" para otorgar permiso a todos los paquetes. Para paquetes dudosos, se recomienda ejecutar el comando \"npm approve-scripts --allow-scripts-pending\", que mostrar\u00e1 una lista de scripts que solicitan ejecuci\u00f3n. Tras revisar estos scripts, se pueden permitir con el comando \"npm approve-scripts\" y a\u00f1adir a la lista blanca en package.json.    <\/p>\n<p>Adem\u00e1s, se ha anunciado la prohibici\u00f3n del uso de tokens de acceso GAT (Granular Access Tokens) en el repositorio de NPM, configurados para realizar acciones sin autenticaci\u00f3n de dos factores (2FA). A partir de agosto, tales tokens no permitir\u00e1n la realizaci\u00f3n de operaciones como la creaci\u00f3n o eliminaci\u00f3n de tokens, el cambio de perfil, contrase\u00f1a o correo electr\u00f3nico, la configuraci\u00f3n de la autenticaci\u00f3n de dos factores, la generaci\u00f3n de c\u00f3digos de recuperaci\u00f3n, el cambio de permisos y la gesti\u00f3n de colaboradores sin una verificaci\u00f3n manual adicional.    <\/p>\n<p>En enero de 2027 se planea prohibir la publicaci\u00f3n directa de paquetes que utilizan tokens eludiendo 2FA. Sin embargo, los paquetes podr\u00e1n publicarse en la secci\u00f3n de staging, donde permanecer\u00e1n hasta que el acompa\u00f1ante confirme manualmente el lanzamiento. Tras esta confirmaci\u00f3n manual, los paquetes publicados estar\u00e1n disponibles para que los usuarios los instalen.     <\/p>\n<p>Para la publicaci\u00f3n autom\u00e1tica, se sugiere utilizar el mecanismo \"Trusted Publishers\", basado en el uso del est\u00e1ndar OpenID Connect (OIDC) y tokens de autenticaci\u00f3n de tiempo limitado, que son intercambiados entre servicios externos y el cat\u00e1logo de paquetes para confirmar la operaci\u00f3n de publicaci\u00f3n de un paquete, en lugar de usar contrase\u00f1as tradicionales o tokens de acceso permanentes a la API.<br \/>\n<br \/>Fuente: <a content=\"nofollow\" rel=\"nofollow\" href=\"https:\/\/www.opennet.ru\/opennews\/art.shtml?num=65878\">opennet.ru<\/a> <\/p>","protected":false,"gt_translate_keys":[{"key":"rendered","format":"html"}]},"excerpt":{"rendered":"<p>\u041e\u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u043d \u0432\u044b\u043f\u0443\u0441\u043a \u043f\u0430\u043a\u0435\u0442\u043d\u043e\u0433\u043e \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440\u0430 NPM 12.0, \u0432\u0445\u043e\u0434\u044f\u0449\u0435\u0433\u043e \u0432 \u043f\u043e\u0441\u0442\u0430\u0432\u043a\u0443 Node.js \u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u043c\u043e\u0433\u043e \u0434\u043b\u044f \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u043c\u043e\u0434\u0443\u043b\u0435\u0439 \u043d\u0430 \u044f\u0437\u044b\u043a\u0435 JavaScript. \u041d\u043e\u0432\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f \u043f\u0440\u0438\u043c\u0435\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u0430 \u043f\u0440\u0435\u043a\u0440\u0430\u0449\u0435\u043d\u0438\u0435\u043c \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432 \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u043f\u0430\u043a\u0435\u0442\u043e\u0432. \u041f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0443\u0441\u043b\u043e\u0436\u043d\u0438\u0442 \u043f\u0440\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0430\u0442\u0430\u043a \u0447\u0435\u0440\u0435\u0437 \u043a\u043e\u043c\u043f\u0440\u043e\u043c\u0435\u0442\u0430\u0446\u0438\u044e \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439 \u0438 \u0437\u0430\u043c\u0435\u0434\u043b\u0438\u0442 \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u0438\u0435 \u0447\u0435\u0440\u0432\u0435\u0439, \u0430\u043a\u0442\u0438\u0432\u0438\u0440\u0443\u0435\u043c\u044b\u0445 \u0438\u0437 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043e\u0447\u043d\u044b\u0445 \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432. \u0414\u043b\u044f \u0437\u0430\u043f\u0440\u0435\u0442\u0430 \u0430\u0432\u0442\u043e\u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432, \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0445 \u0432 package.json \u0447\u0435\u0440\u0435\u0437 [&hellip;]<\/p>\n","protected":false,"gt_translate_keys":[{"key":"rendered","format":"html"}]},"author":10,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[702],"tags":[],"class_list":["post-182580","post","type-post","status-publish","format-standard","hentry","category-news"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.2 - aioseo.com -->\n\t<meta name=\"description\" content=\"\u041e\u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u043d \u0432\u044b\u043f\u0443\u0441\u043a \u043f\u0430\u043a\u0435\u0442\u043d\u043e\u0433\u043e \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440\u0430 NPM 12.0, \u0432\u0445\u043e\u0434\u044f\u0449\u0435\u0433\u043e \u0432 \u043f\u043e\u0441\u0442\u0430\u0432\u043a\u0443 Node.js \u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u043c\u043e\u0433\u043e \u0434\u043b\u044f \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u043c\u043e\u0434\u0443\u043b\u0435\u0439 \u043d\u0430 \u044f\u0437\u044b\u043a\u0435 JavaScript.\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Alexander Kovalev\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/prohoster.info\/es\/blog\/news\/v-npm-12-0-po-umolchaniyu-otklyuchyon-zapusk-skriptov-pri-ustanovke-paketov\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.2\" \/>\n\t\t<meta property=\"og:locale\" content=\"es_ES\" \/>\n\t\t<meta property=\"og:site_name\" content=\"ProHoster | \u041a\u0443\u043f\u0438\u0442\u044c \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0439 \u0445\u043e\u0441\u0442\u0438\u043d\u0433 \u0434\u043b\u044f \u0441\u0430\u0439\u0442\u043e\u0432 \u0441 \u0437\u0430\u0449\u0438\u0442\u043e\u0439 \u043e\u0442 DDoS, VPS VDS \u0441\u0435\u0440\u0432\u0435\u0440\u044b\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"\ud83e\udd47\u0412 NPM 12.0 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u043e\u0442\u043a\u043b\u044e\u0447\u0451\u043d \u0437\u0430\u043f\u0443\u0441\u043a \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432 \u043f\u0440\u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0435 \u043f\u0430\u043a\u0435\u0442\u043e\u0432 | ProHoster\" \/>\n\t\t<meta property=\"og:description\" content=\"\u041e\u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u043d \u0432\u044b\u043f\u0443\u0441\u043a \u043f\u0430\u043a\u0435\u0442\u043d\u043e\u0433\u043e \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440\u0430 NPM 12.0, \u0432\u0445\u043e\u0434\u044f\u0449\u0435\u0433\u043e \u0432 \u043f\u043e\u0441\u0442\u0430\u0432\u043a\u0443 Node.js \u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u043c\u043e\u0433\u043e \u0434\u043b\u044f \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u043c\u043e\u0434\u0443\u043b\u0435\u0439 \u043d\u0430 \u044f\u0437\u044b\u043a\u0435 JavaScript.\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/prohoster.info\/es\/blog\/news\/v-npm-12-0-po-umolchaniyu-otklyuchyon-zapusk-skriptov-pri-ustanovke-paketov\" \/>\n\t\t<meta property=\"og:image\" content=\"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg\" \/>\n\t\t<meta property=\"og:image:secure_url\" content=\"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg\" \/>\n\t\t<meta property=\"og:image:width\" content=\"350\" \/>\n\t\t<meta property=\"og:image:height\" content=\"350\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2026-07-09T20:53:44+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2026-07-09T20:53:44+00:00\" \/>\n\t\t<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/prohoster\" \/>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"\ud83e\udd47En NPM 12.0, por defecto se desactiv\u00f3 la ejecuci\u00f3n de scripts al instalar paquetes | ProHoster","description":"Se ha publicado la versi\u00f3n 12.0 del gestor de paquetes NPM, que forma parte de la distribuci\u00f3n de Node.js y se utiliza para la distribuci\u00f3n de m\u00f3dulos en JavaScript.","canonical_url":"https:\/\/prohoster.info\/es\/blog\/news\/v-npm-12-0-po-umolchaniyu-otklyuchyon-zapusk-skriptov-pri-ustanovke-paketov","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":null,"og:locale":"es_ES","og:site_name":"ProHoster | \u041a\u0443\u043f\u0438\u0442\u044c \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0439 \u0445\u043e\u0441\u0442\u0438\u043d\u0433 \u0434\u043b\u044f \u0441\u0430\u0439\u0442\u043e\u0432 \u0441 \u0437\u0430\u0449\u0438\u0442\u043e\u0439 \u043e\u0442 DDoS, VPS VDS \u0441\u0435\u0440\u0432\u0435\u0440\u044b","og:type":"article","og:title":"\ud83e\udd47\u0412 NPM 12.0 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u043e\u0442\u043a\u043b\u044e\u0447\u0451\u043d \u0437\u0430\u043f\u0443\u0441\u043a \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432 \u043f\u0440\u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0435 \u043f\u0430\u043a\u0435\u0442\u043e\u0432 | ProHoster","og:description":"\u041e\u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u043d \u0432\u044b\u043f\u0443\u0441\u043a \u043f\u0430\u043a\u0435\u0442\u043d\u043e\u0433\u043e \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440\u0430 NPM 12.0, \u0432\u0445\u043e\u0434\u044f\u0449\u0435\u0433\u043e \u0432 \u043f\u043e\u0441\u0442\u0430\u0432\u043a\u0443 Node.js \u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u043c\u043e\u0433\u043e \u0434\u043b\u044f \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u043c\u043e\u0434\u0443\u043b\u0435\u0439 \u043d\u0430 \u044f\u0437\u044b\u043a\u0435 JavaScript.","og:url":"https:\/\/prohoster.info\/es\/blog\/news\/v-npm-12-0-po-umolchaniyu-otklyuchyon-zapusk-skriptov-pri-ustanovke-paketov","og:image":"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg","og:image:secure_url":"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg","og:image:width":350,"og:image:height":350,"article:published_time":"2026-07-09T20:53:44+00:00","article:modified_time":"2026-07-09T20:53:44+00:00","article:publisher":"https:\/\/www.facebook.com\/prohoster"},"aioseo_meta_data":{"post_id":"182580","title":null,"description":null,"keywords":null,"keyphrases":{"focus":[],"additional":[]},"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"","isEnabled":true},"graphs":[]},"schema_type":"default","schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"seo_analyzer_scan_date":null,"breadcrumb_settings":null,"limit_modified_date":false,"reviewed_by":null,"ai":null,"created":"2026-08-05 12:22:05","updated":"2026-08-05 12:22:05","focus_keyword":null,"additional_keywords":null,"truseo_locale":null},"gt_translate_keys":[{"key":"link","format":"url"}],"_links":{"self":[{"href":"https:\/\/prohoster.info\/es\/wp-json\/wp\/v2\/posts\/182580","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/prohoster.info\/es\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/prohoster.info\/es\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/prohoster.info\/es\/wp-json\/wp\/v2\/users\/10"}],"replies":[{"embeddable":true,"href":"https:\/\/prohoster.info\/es\/wp-json\/wp\/v2\/comments?post=182580"}],"version-history":[{"count":0,"href":"https:\/\/prohoster.info\/es\/wp-json\/wp\/v2\/posts\/182580\/revisions"}],"wp:attachment":[{"href":"https:\/\/prohoster.info\/es\/wp-json\/wp\/v2\/media?parent=182580"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/prohoster.info\/es\/wp-json\/wp\/v2\/categories?post=182580"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/prohoster.info\/es\/wp-json\/wp\/v2\/tags?post=182580"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}