Skip to content

Conversation

@ryanthemanuel
Copy link
Collaborator

@ryanthemanuel ryanthemanuel commented Jun 21, 2025

Additional details

The general idea behind the manifest is:

  • We add a manifest to the cloud delivered bundles containing each file and a sha-256 hash for that file
  • At upload time, we sign the manifest using our encryption key and stores it alongside other bundle information
  • When requested from the app, we send the manifest signature along as a header
  • In the app at download time, we read the manifest into memory and then validates it using the signature
  • The in-memory manifest is then used to validate every file that is read from the bundle to ensure it has not been modified

Steps to test

How has the user experience changed?

PR Tasks

@ryanthemanuel ryanthemanuel self-assigned this Jun 21, 2025
@cypress
Copy link

cypress bot commented Jun 21, 2025

cypress    Run #63491

Run Properties:  status check passed Passed #63491  •  git commit 6ff5d08b0a: Merge branch 'develop' into ryanm/chore/add-manifest-for-studio
Project cypress
Branch Review ryanm/chore/add-manifest-for-studio
Run status status check passed Passed #63491
Run duration 18m 25s
Commit git commit 6ff5d08b0a: Merge branch 'develop' into ryanm/chore/add-manifest-for-studio
Committer Ryan Manuel
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 10
Tests that did not run due to a developer annotating a test with .skip  Pending 1232
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 32178
View all changes introduced in this branch ↗︎
UI Coverage  45.56%
  Untested elements 191  
  Tested elements 164  
Accessibility  92.74%
  Failed rules  3 critical   9 serious   2 moderate   2 minor
  Failed elements 695  

This comment was marked as outdated.

@ryanthemanuel ryanthemanuel requested a review from mabela416 June 30, 2025 22:28
@ryanthemanuel ryanthemanuel requested a review from Copilot June 30, 2025 23:04

This comment was marked as outdated.

@ryanthemanuel ryanthemanuel requested a review from Copilot June 30, 2025 23:05
Copy link
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

This PR introduces a manifest file into the cloud-delivered bundles, adding SHA-256 hash verification and signature checking to ensure file integrity. Key changes include adding manifest handling to the bundle extraction logic, updating studio and API tests to verify manifest-related behavior, and modifying studio manager setup to use the manifest for server script hash verification.

Reviewed Changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated no comments.

Show a summary per file
File Description
scripts/after-pack-hook.js Reorders and groups file writes to include new studio protocol and environment files.
packages/types/src/studio/studio-server-types.ts Adds definitions for manifest and verifyHash in studio server options.
packages/server/test/unit/cloud/studio/studio_spec.ts Updates tests to include a manifest property in studio server options.
packages/server/test/unit/cloud/studio/ensure_studio_bundle_spec.ts Extends tests to check for manifest presence and signature validation error paths.
packages/server/test/unit/cloud/studio/StudioLifecycleManager_spec.ts Incorporates manifest usage in studio lifecycle manager tests and error handling for missing/incorrect studio script hashes.
packages/server/test/unit/cloud/api/studio/get_studio_bundle_spec.ts Validates the retrieval and checking of the manifest signature from response headers.
packages/server/lib/cloud/studio/studio.ts Integrates the manifest and hash verification logic during studio server creation.
packages/server/lib/cloud/studio/ensure_studio_bundle.ts Implements manifest extraction, file existence check, signature verification, and JSON parsing.
packages/server/lib/cloud/studio/StudioLifecycleManager.ts Updates studio manager lifecycle to use the manifest for verifying the studio server script’s hash.
packages/server/lib/cloud/encryption.ts Updates verifySignature to accept BinaryLike input rather than a string.
packages/server/lib/cloud/api/studio/get_studio_bundle.ts Retrieves and returns the manifest signature from response headers and handles its absence.

@ryanthemanuel ryanthemanuel merged commit 954847c into develop Jul 2, 2025
89 of 91 checks passed
@ryanthemanuel ryanthemanuel deleted the ryanm/chore/add-manifest-for-studio branch July 2, 2025 03:21
@cypress-bot
Copy link
Contributor

cypress-bot bot commented Jul 15, 2025

Released in 14.5.2.

This comment thread has been locked. If you are still experiencing this issue after upgrading to
Cypress v14.5.2, please open a new issue.

@cypress-bot cypress-bot bot locked as resolved and limited conversation to collaborators Jul 15, 2025
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