Malware Blocking and Dependency Policies in Composer 2.10

发布日期 经过

Malware Blocking and Dependency Policies in Composer 2.10 image

Composer 2.10 is now available with native malware filtering, a new dependency policy configuration system, and several security-related changes for PHP projects.

The release was announced by 斯蒂芬·沃克尼尔斯·阿德曼 on the Packagist blog, and the big feature is a malware policy that blocks package versions flagged as malicious from being installed through Packagist.org.

Composer 2.10 introduces a malware policy to enable rapid removal of malicious versions published either by attackers who briefly gained control of a legitimate package, or by maintainers acting in bad faith. Flagged versions are removed from the resolution pool, so they cannot be installed via composer update, composer require or composer create-project. Crucially, the check also runs during composer install where versions flagged after a composer.lock was generated will fail the next install. A malicious release that slipped into a lockfile will not be silently pulled in on CI runs or in production deployments. The same versions are surfaced by composer audit, which fails the audit when finding malware by default.

Composer already blocks package versions with known security advisories during updates. Composer 2.10 expands that protection to malware, including package versions published after an attacker gains control of a repository or package.

Other Composer 2.10 highlights include:

  • 新的 config.policy object for security advisories, abandoned packages, malware, and custom policies.
  • Deprecation of automatic source fallback when dist downloads fail, with a temporary source-fallback config option.
  • Wildcard support for composer update --with , for example composer update --with "acme/*:^2.0"
  • 新的 --require 选择 composer create-project
  • Plugin autoloading and dependency resolver memory improvements.

Composer's changelog marks two backward-compatibility items in 2.10: automatic source fallback is disabled, and composer audit exit codes now use 0 for success and 1 when the audit fails.

You can update Composer with the self-update command:

作曲家 self-update

阅读全文 Composer 2.10 release announcement on the Packagist blog for the full security context, default policy behavior, configuration examples, and links to the related implementation PRs. Also, if you release packages be sure and check out their other post on An Update on Composer & Packagist Supply Chain Security

埃里克·L·巴恩斯摄

Eric 是 Laravel News 的创建者,自 2012 年以来一直报道 Laravel 相关内容。

归档于:
立方体

Laravel 时事通讯

加入超过 4 万名开发者的行列,不错过任何新的技巧、教程等内容。

图像
廷克威尔

这款编辑器专为快速反馈和快速迭代而设计,让您尽享编码和调试的乐趣。它就像您应用程序的一个外壳——但具备多行编辑、代码自动完成等更多功能。

参观廷克韦尔
SaaSykit:Laravel SaaS 入门套件徽标

SaaSykit:Laravel SaaS 入门套件

SaaSykit 是一个多租户 Laravel SaaS 入门套件,包含运行现代 SaaS 所需的所有功能,例如支付、美观的结账界面、管理面板、用户仪表盘、身份验证、现成组件、统计数据、博客、文档等等。

SaaSykit:Laravel SaaS 入门套件
Laravel Cloud 标志

Laravel 云

轻松创建和管理服务器,并在几秒钟内部署 Laravel 应用程序。

Laravel 云
Kirschbaum 标志

樱桃树

提供创新和稳定性,确保您的Web应用程序取得成功。

樱桃树
绝不妥协标志

绝不妥协

来自 No Compromises 播客的两位经验丰富的开发者 Joel 和 Aaron 现在可以为您的 Laravel 项目提供服务。⬧ 固定费用 9500 美元/月。⬧ 无冗长的销售流程。⬧ 无需签订合同。⬧ 100% 退款保证。

绝不妥协
鱼叉:新一代时间跟踪和发票标志

Harpoon:新一代时间跟踪和发票系统

新一代时间跟踪和计费软件,帮助您的机构规划和预测盈利的未来。

Harpoon:新一代时间跟踪和发票系统
PhpStorm 标志

PhpStorm

首选的 PHP IDE,对 Laravel 及其生态系统提供广泛的开箱即用支持。

PhpStorm
Tinkerwell 徽标

廷克威尔

Laravel 开发者必备的代码运行器。可在本地和生产环境中体验 AI、自动补全和即时反馈功能。

廷克威尔
Shift 标志

转移

还在运行旧版本的 Laravel?立即实现 Laravel 自动升级和代码现代化,让您的应用程序保持最新状态。

转移
了解 Softtech 的标志

了解软科技

Acquaint Softtech 提供 AI 就绪的 Laravel 开发人员,48 小时内即可上手,每月费用为 3000 美元,没有冗长的销售流程,并提供 100% 退款保证。

了解软科技
Lucky Media 标志

幸运传媒

Get Lucky Now——拥有十余年经验的 Laravel 开发理想之选!

幸运传媒
Laracon AU 2026 Announces Full Speaker Lineup, Schedule, and Workshops image

Laracon AU 2026 Announces Full Speaker Lineup, Schedule, and Workshops

阅读文章
Parsel: Parse PDFs, Office Documents, and Images in PHP image

Parsel: Parse PDFs, Office Documents, and Images in PHP

阅读文章
Typed Objects for Eloquent with Expressive image

Typed Objects for Eloquent with Expressive

阅读文章
Aegis for Laravel: Scaffolding and Validation Helpers for Value Objects image

Aegis for Laravel: Scaffolding and Validation Helpers for Value Objects

阅读文章
Playa: Cookie-Based Temporary Players for Laravel image

Playa: Cookie-Based Temporary Players for Laravel

阅读文章
Scheduler Attributes and Listener Discovery Control in Laravel 13.12.0 image

Scheduler Attributes and Listener Discovery Control in Laravel 13.12.0

阅读文章