Skip to content

Fix Playwright CLI provenance verification for tag format change#16087

Open
mitchdenny wants to merge 1 commit intomainfrom
fix/playwright-cli-provenance-tag-format
Open

Fix Playwright CLI provenance verification for tag format change#16087
mitchdenny wants to merge 1 commit intomainfrom
fix/playwright-cli-provenance-tag-format

Conversation

@mitchdenny
Copy link
Copy Markdown
Member

Description

aspire new fails with ❌ Provenance verification failed for @playwright/cli@0.1.7: WorkflowRefMismatch because the Playwright team changed their git tag naming convention. Starting with 0.1.7, tags no longer include the v prefix (e.g., refs/tags/0.1.7 instead of refs/tags/v0.1.7).

Our provenance verification callback in PlaywrightCliInstaller expected v{version} in the tag name, which no longer matches the actual provenance attestation.

Fix:

  • Bump minimum version from >=0.1.3 to >=0.1.7 so we only resolve versions using the new tag format
  • Update the validateWorkflowRef callback to expect tags without the v prefix
  • Add a test that captures and exercises the callback to verify the new format

Validation: All 1997 Aspire.Cli.Tests pass locally. Verified by decoding the SLSA provenance attestation payloads for both 0.1.6 (refs/tags/v0.1.6) and 0.1.7 (refs/tags/0.1.7) from the npm registry to confirm the tag format change.

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
    • 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
  • Does the change require an update in our Aspire docs?
    • Yes
    • No

Copilot AI review requested due to automatic review settings April 12, 2026 08:44
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 12, 2026

🚀 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 -- 16087

Or

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

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Fixes aspire new failures caused by a Playwright CLI tag naming convention change that broke SLSA provenance workflow ref verification.

Changes:

  • Updated the Playwright CLI minimum resolved version range to >=0.1.7.
  • Adjusted provenance workflow ref validation to expect tags without the v prefix.
  • Added a unit test that captures and validates the workflow ref validator behavior.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
src/Aspire.Cli/Agents/Playwright/PlaywrightCliInstaller.cs Updates the resolved version floor and workflow ref validation logic for provenance verification.
tests/Aspire.Cli.Tests/Agents/PlaywrightCliInstallerTests.cs Adds a regression test to validate the workflow ref callback for the new tag format.

Comment on lines 185 to 189
ExpectedWorkflowPath,
ExpectedBuildType,
refInfo => string.Equals(refInfo.Kind, "tags", StringComparison.Ordinal) &&
string.Equals(refInfo.Name, $"v{packageInfo.Version}", StringComparison.Ordinal),
string.Equals(refInfo.Name, $"{packageInfo.Version}", StringComparison.Ordinal),
cancellationToken,
Copy link

Copilot AI Apr 12, 2026

Choose a reason for hiding this comment

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

The workflow ref validator now only accepts tag names equal to the version (e.g., "0.1.7"). However, playwrightCliVersion can override the resolved version (and may be set to <0.1.7), where provenance uses refs/tags/v{version}. With the current callback, those overrides will fail provenance verification with WorkflowRefMismatch. Consider accepting both v{version} and {version}, or choosing the expected format based on the resolved version, and add a regression test covering an override to 0.1.6.

Copilot uses AI. Check for mistakes.
@playwright/cli 0.1.7 changed their git tag naming convention from
'v0.1.7' to '0.1.7' (dropped the 'v' prefix). This caused our
provenance verification to fail with WorkflowRefMismatch.

- Accept both tag formats (with and without 'v' prefix) in the
  validateWorkflowRef callback for forward/backward compatibility
- Add test verifying both tag formats pass validation

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@mitchdenny mitchdenny force-pushed the fix/playwright-cli-provenance-tag-format branch from 9f57b42 to 2ddad2b Compare April 12, 2026 10:20
@mitchdenny
Copy link
Copy Markdown
Member Author

/deployment-test

@github-actions github-actions bot had a problem deploying to deployment-testing April 12, 2026 10:29 Failure
@github-actions github-actions bot had a problem deploying to deployment-testing April 12, 2026 10:29 Failure
@github-actions github-actions bot had a problem deploying to deployment-testing April 12, 2026 10:29 Failure
@github-actions github-actions bot temporarily deployed to deployment-testing April 12, 2026 10:29 Inactive
@github-actions github-actions bot temporarily deployed to deployment-testing April 12, 2026 10:29 Inactive
@github-actions github-actions bot had a problem deploying to deployment-testing April 12, 2026 10:29 Failure
@github-actions github-actions bot temporarily deployed to deployment-testing April 12, 2026 10:29 Inactive
@github-actions github-actions bot temporarily deployed to deployment-testing April 12, 2026 10:29 Inactive
@github-actions github-actions bot had a problem deploying to deployment-testing April 12, 2026 10:29 Failure
@github-actions github-actions bot temporarily deployed to deployment-testing April 12, 2026 10:29 Inactive
@github-actions github-actions bot temporarily deployed to deployment-testing April 12, 2026 10:29 Inactive
@github-actions github-actions bot had a problem deploying to deployment-testing April 12, 2026 10:29 Failure
@github-actions github-actions bot temporarily deployed to deployment-testing April 12, 2026 10:29 Inactive
@github-actions github-actions bot temporarily deployed to deployment-testing April 12, 2026 10:29 Inactive
@github-actions github-actions bot had a problem deploying to deployment-testing April 12, 2026 10:29 Failure
@github-actions github-actions bot had a problem deploying to deployment-testing April 12, 2026 10:29 Failure
@github-actions github-actions bot had a problem deploying to deployment-testing April 12, 2026 10:29 Failure
@github-actions github-actions bot temporarily deployed to deployment-testing April 12, 2026 10:29 Inactive
@github-actions github-actions bot had a problem deploying to deployment-testing April 12, 2026 10:29 Failure
@github-actions github-actions bot temporarily deployed to deployment-testing April 12, 2026 10:29 Inactive
@github-actions github-actions bot had a problem deploying to deployment-testing April 12, 2026 10:29 Failure
@github-actions github-actions bot had a problem deploying to deployment-testing April 12, 2026 10:29 Failure
@github-actions github-actions bot temporarily deployed to deployment-testing April 12, 2026 10:29 Inactive
@github-actions github-actions bot had a problem deploying to deployment-testing April 12, 2026 10:29 Failure
@github-actions github-actions bot temporarily deployed to deployment-testing April 12, 2026 10:29 Inactive
@github-actions github-actions bot had a problem deploying to deployment-testing April 12, 2026 10:29 Failure
@github-actions github-actions bot temporarily deployed to deployment-testing April 12, 2026 10:29 Inactive
@github-actions github-actions bot temporarily deployed to deployment-testing April 12, 2026 10:29 Inactive
@github-actions github-actions bot temporarily deployed to deployment-testing April 12, 2026 10:29 Inactive
@github-actions github-actions bot had a problem deploying to deployment-testing April 12, 2026 10:29 Failure
@github-actions
Copy link
Copy Markdown
Contributor

🎬 CLI E2E Test Recordings — 68 recordings uploaded (commit 2ddad2b)

View recordings
Test Recording
AddPackageInteractiveWhileAppHostRunningDetached ▶️ View Recording
AddPackageWhileAppHostRunningDetached ▶️ View Recording
AgentCommands_AllHelpOutputs_AreCorrect ▶️ View Recording
AgentInitCommand_DefaultSelection_InstallsSkillOnly ▶️ View Recording
AgentInitCommand_MigratesDeprecatedConfig ▶️ View Recording
AllPublishMethodsBuildDockerImages ▶️ View Recording
AspireAddPackageVersionToDirectoryPackagesProps ▶️ View Recording
AspireUpdateRemovesAppHostPackageVersionFromDirectoryPackagesProps ▶️ View Recording
Banner_DisplayedOnFirstRun ▶️ View Recording
Banner_DisplayedWithExplicitFlag ▶️ View Recording
Banner_NotDisplayedWithNoLogoFlag ▶️ View Recording
CertificatesClean_RemovesCertificates ▶️ View Recording
CertificatesTrust_WithNoCert_CreatesAndTrustsCertificate ▶️ View Recording
CertificatesTrust_WithUntrustedCert_TrustsCertificate ▶️ View Recording
ConfigSetGet_CreatesNestedJsonFormat ▶️ View Recording
CreateAndRunAspireStarterProject ▶️ View Recording
CreateAndRunAspireStarterProjectWithBundle ▶️ View Recording
CreateAndRunEmptyAppHostProject ▶️ View Recording
CreateAndRunJavaEmptyAppHostProject ▶️ View Recording
CreateAndRunJsReactProject ▶️ View Recording
CreateAndRunPythonReactProject ▶️ View Recording
CreateAndRunTypeScriptEmptyAppHostProject ▶️ View Recording
CreateAndRunTypeScriptStarterProject ▶️ View Recording
CreateJavaAppHostWithViteApp ▶️ View Recording
CreateStartAndStopAspireProject ▶️ View Recording
CreateTypeScriptAppHostWithViteApp ▶️ View Recording
DashboardRunWithOtelTracesReturnsNoTraces ▶️ View Recording
DeployK8sBasicApiService ▶️ View Recording
DeployK8sWithGarnet ▶️ View Recording
DeployK8sWithMongoDB ▶️ View Recording
DeployK8sWithMySql ▶️ View Recording
DeployK8sWithPostgres ▶️ View Recording
DeployK8sWithRabbitMQ ▶️ View Recording
DeployK8sWithRedis ▶️ View Recording
DeployK8sWithSqlServer ▶️ View Recording
DeployK8sWithValkey ▶️ View Recording
DeployTypeScriptAppToKubernetes ▶️ View Recording
DescribeCommandResolvesReplicaNames ▶️ View Recording
DescribeCommandShowsRunningResources ▶️ View Recording
DetachFormatJsonProducesValidJson ▶️ View Recording
DoctorCommand_DetectsDeprecatedAgentConfig ▶️ View Recording
DoctorCommand_WithSslCertDir_ShowsTrusted ▶️ View Recording
DoctorCommand_WithoutSslCertDir_ShowsPartiallyTrusted ▶️ View Recording
GlobalMigration_HandlesCommentsAndTrailingCommas ▶️ View Recording
GlobalMigration_HandlesMalformedLegacyJson ▶️ View Recording
GlobalMigration_PreservesAllValueTypes ▶️ View Recording
GlobalMigration_SkipsWhenNewConfigExists ▶️ View Recording
GlobalSettings_MigratedFromLegacyFormat ▶️ View Recording
InitTypeScriptAppHost_AugmentsExistingViteRepoAtRoot ▶️ View Recording
InvalidAppHostPathWithComments_IsHealedOnRun ▶️ View Recording
LegacySettingsMigration_AdjustsRelativeAppHostPath ▶️ View Recording
LogsCommandShowsResourceLogs ▶️ View Recording
PsCommandListsRunningAppHost ▶️ View Recording
PsFormatJsonOutputsOnlyJsonToStdout ▶️ View Recording
PublishWithDockerComposeServiceCallbackSucceeds ▶️ View Recording
RestoreGeneratesSdkFiles ▶️ View Recording
RestoreSupportsConfigOnlyHelperPackageAndCrossPackageTypes ▶️ View Recording
RunFromParentDirectory_UsesExistingConfigNearAppHost ▶️ View Recording
SecretCrudOnDotNetAppHost ▶️ View Recording
SecretCrudOnTypeScriptAppHost ▶️ View Recording
StagingChannel_ConfigureAndVerifySettings_ThenSwitchChannels ▶️ View Recording
StartAndWaitForTypeScriptSqlServerAppHostWithNativeAssets ▶️ View Recording
StopAllAppHostsFromAppHostDirectory ▶️ View Recording
StopAllAppHostsFromUnrelatedDirectory ▶️ View Recording
StopNonInteractiveMultipleAppHostsShowsError ▶️ View Recording
StopNonInteractiveSingleAppHost ▶️ View Recording
StopWithNoRunningAppHostExitsSuccessfully ▶️ View Recording
UnAwaitedChainsCompileWithAutoResolvePromises ▶️ View Recording

📹 Recordings uploaded automatically from CI run #24304434114

@github-actions
Copy link
Copy Markdown
Contributor

Deployment E2E Tests failed — 15 passed, 15 failed, 0 cancelled

View test results and recordings

View workflow run

Test Result Recording
Deployment.EndToEnd-NspStorageKeyVaultDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-AcaCompactNamingDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-AzureLogAnalyticsDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-AzureServiceBusDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-AzureStorageDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-AzureKeyVaultDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-AzureAppConfigDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-AcaExistingRegistryDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-AuthenticationTests ✅ Passed
Deployment.EndToEnd-AcaStarterDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-AzureContainerRegistryDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-AcaCustomRegistryDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-AcaDeploymentErrorOutputTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-AppServiceReactDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-AzureEventHubsDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-VnetSqlServerConnectivityDeploymentTests ❌ Failed ▶️ View Recording
Deployment.EndToEnd-PythonFastApiDeploymentTests ❌ Failed ▶️ View Recording
Deployment.EndToEnd-TypeScriptVnetSqlServerInfraDeploymentTests ❌ Failed ▶️ View Recording
Deployment.EndToEnd-VnetKeyVaultInfraDeploymentTests ❌ Failed ▶️ View Recording
Deployment.EndToEnd-TypeScriptExpressDeploymentTests ❌ Failed ▶️ View Recording
Deployment.EndToEnd-VnetKeyVaultConnectivityDeploymentTests ❌ Failed ▶️ View Recording
Deployment.EndToEnd-AppServicePythonDeploymentTests ❌ Failed ▶️ View Recording
Deployment.EndToEnd-VnetStorageBlobInfraDeploymentTests ❌ Failed ▶️ View Recording
Deployment.EndToEnd-AcaManagedRedisDeploymentTests ❌ Failed ▶️ View Recording
Deployment.EndToEnd-VnetStorageBlobConnectivityDeploymentTests ❌ Failed ▶️ View Recording
Deployment.EndToEnd-AksStarterDeploymentTests ❌ Failed ▶️ View Recording
Deployment.EndToEnd-AcrPurgeTaskDeploymentTests ❌ Failed ▶️ View Recording
Deployment.EndToEnd-AksStarterWithRedisDeploymentTests ❌ Failed ▶️ View Recording
Deployment.EndToEnd-VnetSqlServerInfraDeploymentTests ❌ Failed ▶️ View Recording
Deployment.EndToEnd-AcaCompactNamingUpgradeDeploymentTests ❌ Failed ▶️ View Recording

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants