GitHub said on October 2 that npm trusted publishing configurations that have not been validated now expire 48 hours after creation and can no longer authorize publishing.

The GitHub changelog entry gives the reason as limiting the risk of trusting a repository or project name that changes ownership. A configuration becomes validated and exempt from expiry after its first successful publish. Changing the repository or project identity requires a new trust relationship with a fresh 48-hour window, and ordinary edits do not restart the deadline. Expired configurations stay visible in the trusted publisher settings and do not count toward per-package limits, and other valid configurations on the same package are unaffected. If a configuration expires, a maintainer recreates it to start a new window.

The same entry adds a second change. npm now rejects trusted publishing tokens from GitHub Actions issue_comment events, alongside its existing restriction on pull_request_target. A workflow affected by that rule has to publish from a permitted event such as push, release or workflow_dispatch.

For a maintainer, the practical effect is timing. A trusted publisher set up weeks before a first release will lapse, so the setup step belongs right before the publish. For a security team, the useful exercise is an audit of which internal packages publish through trusted publishing, which workflows hold the permission, and which event triggers those workflows listen to. Any pipeline that publishes in response to a comment will break on the new rule and needs a different trigger.

The change targets a specific weakness in how a package trusts a source. A trust relationship that names a repository can outlive the repository’s owner, and the 48-hour validation window limits how long an unused entry can point at a name whose owner has changed. It is one more control on a supply chain we have followed in GhostAction’s sweep of 345 repositories and the tensorlake npm release that carried a credential-stealing worm.

Source: GitHub Changelog