-
Notifications
You must be signed in to change notification settings - Fork 3.3k
chore: (cy.prompt) add manifest for all of the cloud delivered files #31922
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: feat/cy-prompt
Are you sure you want to change the base?
chore: (cy.prompt) add manifest for all of the cloud delivered files #31922
Conversation
cypress
|
Project |
cypress
|
Branch Review |
ryanm/chore/add-manifest-for-cy-prompt
|
Run status |
|
Run duration | 18m 52s |
Commit |
|
Committer | Ryan Manuel |
View all properties for this run ↗︎ |
Test results | |
---|---|
|
0
|
|
12
|
|
1232
|
|
3
|
|
32204
|
View all changes introduced in this branch ↗︎ |
Warning
Partial Report: The results for the Application Quality reports may be incomplete.
UI Coverage
45.71%
|
|
---|---|
|
191
|
|
165
|
Accessibility
92.89%
|
|
---|---|
|
3 critical
9 serious
2 moderate
2 minor
|
|
686
|
There was a problem hiding this 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 for cloud-delivered cy prompt bundles to ensure file integrity through SHA-256 hashing and signature verification. It adds new functions for obtaining and validating cy prompt file sources, updates the encryption and API layers to handle manifest and signature headers, and extends test coverage to verify these changes.
Reviewed Changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
scripts/binary/binary-sources.js | Introduced getCyPromptFileSource and validateCyPromptFile to handle cy prompt files similar to studio files. |
scripts/after-pack-hook.js | Incorporated cy prompt file processing into the after-pack hook by writing and validating the updated files. |
packages/types/src/cy-prompt/cy-prompt-server-types.ts | Extended type definitions with manifest information and verifyHash functionality. |
packages/server/test/unit/cloud/cy-prompt/* | Added and updated tests to account for manifest presence, signature validation, and error conditions. |
packages/server/lib/cloud/encryption.ts | Modified verifySignature to handle BinaryLike inputs to support manifest validation. |
packages/server/lib/cloud/cy-prompt/ensure_cy_prompt_bundle.ts | Implemented manifest file reading and signature verification with appropriate error handling. |
packages/server/lib/cloud/cy-prompt/CyPromptManager.ts | Updated setup to pass manifest data and a verifyHash callback to the cy prompt server. |
packages/server/lib/cloud/cy-prompt/CyPromptLifecycleManager.ts | Refactored logic to load and validate the manifest, including checking for the server script’s hash. |
packages/server/lib/cloud/api/cy-prompt/get_cy_prompt_bundle.ts | Added logic to retrieve and verify the manifest signature from response headers. |
packages/driver/src/cypress/error_messages.ts | Updated error message formatting to handle cases where error codes may be undefined. |
Additional details
The general idea behind the manifest is:
Steps to test
How has the user experience changed?
PR Tasks
cypress-documentation
?type definitions
?