{"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\/pt\/blog\/news\/v-npm-12-0-po-umolchaniyu-otklyuchyon-zapusk-skriptov-pri-ustanovke-paketov","title":{"rendered":"No NPM 12.0, a execu\u00e7\u00e3o de scripts durante a instala\u00e7\u00e3o de pacotes est\u00e1 desativada por padr\u00e3o","gt_translate_keys":[{"key":"rendered","format":"text"}]},"content":{"rendered":"<p>Foi lan\u00e7ada a vers\u00e3o 12.0 do gerenciador de pacotes NPM, que faz parte da entrega do Node.js e \u00e9 utilizado para distribuir m\u00f3dulos em JavaScript. A nova vers\u00e3o \u00e9 not\u00e1vel por desativar, por padr\u00e3o, a execu\u00e7\u00e3o de scripts durante a instala\u00e7\u00e3o de pacotes. Espera-se que essa mudan\u00e7a dificulte a realiza\u00e7\u00e3o de ataques por meio da comprometimento de depend\u00eancias e desacelere a propaga\u00e7\u00e3o de worms ativados por scripts de instala\u00e7\u00e3o.    <\/p>\n<p>Para proibir a execu\u00e7\u00e3o autom\u00e1tica de scripts especificados no package.json atrav\u00e9s dos par\u00e2metros preinstall, install ou postinstall, a configura\u00e7\u00e3o allowScripts foi definida como &#171;off&#187; por padr\u00e3o. A execu\u00e7\u00e3o de tais scripts, bem como a compila\u00e7\u00e3o de c\u00f3digo C\/C++ pela ferramenta node-gyp na presen\u00e7a de um arquivo binding.gyp no pacote, agora ocorre apenas mediante uma instru\u00e7\u00e3o expl\u00edcita do usu\u00e1rio. Al\u00e9m disso, os par\u00e2metros &#171;&#8212;allow-git&#187; e &#171;&#8212;allow-remote&#187; agora s\u00e3o definidos como &#171;none&#187; por padr\u00e3o, desativando o download autom\u00e1tico de depend\u00eancias de reposit\u00f3rios Git e links diretos para sites com arquivos tar.    <\/p>\n<p>Para organizar a execu\u00e7\u00e3o de scripts de instala\u00e7\u00e3o, deve-se usar o comando &#171;npm approve-scripts&#187;, ao qual se passam os nomes dos pacotes de confian\u00e7a ou a op\u00e7\u00e3o &#171;&#8212;all&#187; para conceder permiss\u00e3o a todos os pacotes. Para pacotes duvidosos, \u00e9 recomend\u00e1vel executar o comando &#171;npm approve-scripts &#8212;allow-scripts-pending&#187;, que ir\u00e1 exibir uma lista de scripts que est\u00e3o aguardando execu\u00e7\u00e3o. Ap\u00f3s a verifica\u00e7\u00e3o desses scripts, eles podem ser autorizados com o comando &#171;npm approve-scripts&#187; e adicionados \u00e0 lista branca no package.json.    <\/p>\n<p>Al\u00e9m disso, foi anunciado a proibi\u00e7\u00e3o do uso de tokens de acesso GAT (Granular Access Tokens) no reposit\u00f3rio NPM, configurados para realizar a\u00e7\u00f5es sem autentica\u00e7\u00e3o de dois fatores (2FA). A partir de agosto, tais tokens, sem confirma\u00e7\u00e3o manual adicional, n\u00e3o permitir\u00e3o a realiza\u00e7\u00e3o de opera\u00e7\u00f5es como a cria\u00e7\u00e3o ou exclus\u00e3o de tokens, altera\u00e7\u00e3o de perfil, senha ou email, configura\u00e7\u00e3o de autentica\u00e7\u00e3o de dois fatores, gera\u00e7\u00e3o de c\u00f3digos de recupera\u00e7\u00e3o, altera\u00e7\u00e3o de permiss\u00f5es e gerenciamento de acompanhamentos.    <\/p>\n<p>Em janeiro de 2027, pretende-se proibir a publica\u00e7\u00e3o direta de pacotes utilizando tokens que contornem o 2FA. No entanto, os pacotes poder\u00e3o ser publicados na se\u00e7\u00e3o de staging, onde permanecer\u00e3o at\u00e9 a confirma\u00e7\u00e3o manual do lan\u00e7amento pelo respons\u00e1vel. Ap\u00f3s a confirma\u00e7\u00e3o manual, os pacotes publicados se tornar\u00e3o dispon\u00edveis para instala\u00e7\u00e3o pelos usu\u00e1rios.     <\/p>\n<p>Para publica\u00e7\u00e3o autom\u00e1tica, sugere-se utilizar o mecanismo &#171;Trusted Publishers&#187;, baseado na utiliza\u00e7\u00e3o do padr\u00e3o OpenID Connect (OIDC) e tokens de autentica\u00e7\u00e3o com prazo limitado, que s\u00e3o trocados entre servi\u00e7os externos e o cat\u00e1logo de pacotes para confirmar a opera\u00e7\u00e3o de publica\u00e7\u00e3o do pacote em vez de usar senhas tradicionais ou tokens de acesso API permanentes.<br \/>\n<br \/>Fonte: <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.3 - 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\/pt\/blog\/news\/v-npm-12-0-po-umolchaniyu-otklyuchyon-zapusk-skriptov-pri-ustanovke-paketov\" \/>\n\t\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.3\" \/>\n\t\t<meta property=\"og:locale\" content=\"pt_PT\" \/>\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\/pt\/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\udd47No NPM 12.0, a execu\u00e7\u00e3o de scripts durante a instala\u00e7\u00e3o de pacotes est\u00e1 desativada por padr\u00e3o | ProHoster","description":"Foi lan\u00e7ado o gerenciador de pacotes NPM 12.0, que faz parte do Node.js e \u00e9 utilizado para a distribui\u00e7\u00e3o de m\u00f3dulos em JavaScript.","canonical_url":"https:\/\/prohoster.info\/pt\/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":"pt_PT","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\/pt\/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\/pt\/wp-json\/wp\/v2\/posts\/182580","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/prohoster.info\/pt\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/prohoster.info\/pt\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/prohoster.info\/pt\/wp-json\/wp\/v2\/users\/10"}],"replies":[{"embeddable":true,"href":"https:\/\/prohoster.info\/pt\/wp-json\/wp\/v2\/comments?post=182580"}],"version-history":[{"count":0,"href":"https:\/\/prohoster.info\/pt\/wp-json\/wp\/v2\/posts\/182580\/revisions"}],"wp:attachment":[{"href":"https:\/\/prohoster.info\/pt\/wp-json\/wp\/v2\/media?parent=182580"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/prohoster.info\/pt\/wp-json\/wp\/v2\/categories?post=182580"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/prohoster.info\/pt\/wp-json\/wp\/v2\/tags?post=182580"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}