Skip to content

Fix Aspire CLI npm signing scope - #17770

Merged
Adam Ratzman (adamint) merged 1 commit into
microsoft:mainfrom
adamint:fix-npm-cli-signing
Jun 1, 2026
Merged

Fix Aspire CLI npm signing scope#17770
Adam Ratzman (adamint) merged 1 commit into
microsoft:mainfrom
adamint:fix-npm-cli-signing

Conversation

@adamint

@adamint Adam Ratzman (adamint) commented May 31, 2026

Copy link
Copy Markdown
Member

Description

Fixes the internal signed build failure introduced by the Aspire CLI npm package release integration. The failed build staged microsoft-aspire-cli-win-*.tgz into the AspireCliNpmPackage signing scope, but the nested aspire.exe only had an unscoped signing rule. Arcade resolves nested file certificates within the ItemsToSign collision scope, so it failed with Could not determine certificate name for signable file(s): File: aspire.exe.

This keeps the npm tarball signing behavior scoped to Aspire CLI npm packages: .tgz still gets the detached LinuxSign500180PGP signature, aspire.js still uses MicrosoftDotNet500, and the already-signed native aspire.exe/aspire payloads are explicitly CertificateName="None" inside that same scope.

Internal validation build: https://dev.azure.com/dnceng/internal/_build/results?buildId=2988598

Relevant tasks from build 2988598 completed successfully:

  • 🟣Build on Windows, the task that failed on main
  • 🟣Validate npm package signatures
  • 🟣Sign VS Code extension
  • 🟣Verify VS Code extension signature
  • All 🟣Verify CLI npm package (...) tasks for Windows, Linux, and macOS RIDs

Fixes # (issue)

Security considerations

This change touches signing metadata only. The native executable payloads in the npm RID packages are copied from the already-signed native CLI archives; the main Windows build should produce detached signatures for the npm tarballs rather than re-sign those nested native payloads. The tarballs remain covered by detached PGP signatures.

Checklist

  • Is this feature complete?
    • Yes. Ready to ship.
    • No. Follow-up changes expected.
  • Are you including unit tests for the changes and scenario tests if relevant?
    • Yes
    • No
  • Did you add public API?
    • Yes
      • If yes, did you have an API Review for it?
        • Yes
        • No
      • Did you add <remarks /> and <code /> elements on your triple slash comments?
        • Yes
        • No
    • No
  • Does the change make any security assumptions or guarantees?
    • Yes
      • If yes, have you done a threat model and had a security review?
        • Yes
        • No
    • No

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings May 31, 2026 23:13
@github-actions

Copy link
Copy Markdown
Contributor

🚀 Dogfood this PR with:

⚠️ WARNING: Do not do this without first carefully reviewing the code of this PR to satisfy yourself it is safe.

curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 17770

Or

  • Run remotely in PowerShell:
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 17770"

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes Aspire CLI npm package signing metadata so scoped signing rules cover nested native payloads while preserving detached signatures for npm tarballs.

Changes:

  • Adds scoped CertificateName="None" signing rules for nested aspire.exe and aspire payloads in CLI npm tarballs.
  • Adds an infrastructure test that verifies all Aspire CLI npm signing scope rules are present exactly once.
Show a summary per file
File Description
eng/Signing.props Adds scoped signing exclusions for nested native CLI executables in npm package tarballs.
tests/Infrastructure.Tests/Pipelines/NpmCliPackageTests.cs Adds XML-based assertions for Aspire CLI npm signing scope rules.

Copilot's findings

  • Files reviewed: 2/2 changed files
  • Comments generated: 0

@adamint

Copy link
Copy Markdown
Member Author

Double checked this against the actual failed signing path.

The original failure in build 2988560 was Arcade resolving nested aspire.exe inside microsoft-aspire-cli-win-*.tgz under the AspireCliNpmPackage collision scope and finding no scoped cert rule. Build 2988598 ran this fix on fix-npm-cli-signing; the Windows 🟣Build task that failed on main completed successfully, and so did 🟣Validate npm package signatures, all 🟣Verify CLI npm package (...) tasks, and VS Code signing/verification.

Local Infrastructure.Tests also passed: 263 passed / 0 failed.

@adamint
Adam Ratzman (adamint) merged commit 01c5a9a into microsoft:main Jun 1, 2026
619 of 622 checks passed
@github-actions github-actions Bot added this to the 13.5 milestone Jun 1, 2026
Adam Ratzman (adamint) added a commit to adamint/aspire that referenced this pull request Jun 1, 2026
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Ankit Jain (radical) pushed a commit to radical/aspire that referenced this pull request Jun 1, 2026
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Jose Perez Rodriguez (joperezr) pushed a commit that referenced this pull request Jun 2, 2026
* [release/13.4] Add Aspire CLI npm package release integration

Backport of #17297 to release/13.4.

Adds npm packaging and release-pipeline publishing for the Aspire CLI:
pack/sign/verify of the @microsoft/aspire-cli pointer package and its
seven RID packages, npm install validation steps, npm publish + registry
validation stages in release-publish-nuget.yml, npm pipeline variables,
and CLI npm-install detection/update messaging.

The docs/release-process.md changes from the source PR are intentionally
omitted: on main they are interleaved with VS Code extension / Marketplace
release documentation that does not apply to release/13.4 (the VS Code
extension is not released from this branch).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Fix Aspire CLI npm signing scope (#17770)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 1, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants