-
Notifications
You must be signed in to change notification settings - Fork 26
Description
Thank you for maintaining @bahmutov/cy-api!
Cypress.env() will be deprecated in Cypress 15.10, and fully removed in Cypress 16.
Starting in v15.10.0, users can pre-emptively disable Cypress.env() and its environment variable serialization. This is a security issue: values that can be retrieved by Cypress.env() may be freely accessed by the application under test (AUT) and any third party code that the AUT loads into the browser.
Until this plugin migrates, users who want to disable Cypress.env() for security reasons will not be able to.
Migration steps:
- Replace references to
Cypress.envwithCypress.exposefor configuration values that are not sensitive - Use
cy.env()when you have access to the current test context (like in custom commands) and need to access sensitive values like API keys - Directly reference environment variables when your plugin code runs in a Node.js context (like in task definitions)
- Update configuration references and documents to use appropriate configuration methodology
- Set your Cypress peer dependency to >=
15.10.0.
Pre-release resources:
- Updated guide on environment variables and secrets
- Documentation on
cy.env()andCypress.expose() - Migrating away from
Cypress.env() - Preview binaries are available with the upcoming Cypress.expose() and cy.env() functionality:
- Linux x64:
https://cdn.cypress.io/beta/npm/15.10.0/linux-x64/develop-86649210a57b86baaaf9e1c92b1dcf718928eefd/cypress.tgz - Linux arm64:
https://cdn.cypress.io/beta/npm/15.10.0/linux-arm64/develop-86649210a57b86baaaf9e1c92b1dcf718928eefd/cypress.tgz - Win32 x64:
https://cdn.cypress.io/beta/npm/15.10.0/win32-x64/develop-86649210a57b86baaaf9e1c92b1dcf718928eefd/cypress.tgz - Darwin arm64:
https://cdn.cypress.io/beta/npm/15.10.0/darwin-arm64/develop-86649210a57b86baaaf9e1c92b1dcf718928eefd/cypress.tgz - Darwin x64:
https://cdn.cypress.io/beta/npm/15.10.0/darwin-x64/develop-86649210a57b86baaaf9e1c92b1dcf718928eefd/cypress.tgz
- Linux x64:
If you have questions about the migration, please ask! If you have issues with the pre-release binaries, please open an issue in cypress-io/cypress.
Thank you again for being an important part of the Cypress ecosystem.