DEV Community

Discussion on: How to protect sensitive data with Cypress

Collapse
 
abhimassive profile image
Abhi • Edited

Sorry. Not secure enough.
Even though the password in not stored in the source code it can still be accessed.
If your tests run in Cypress dashboard which is public (which you can't make private until you have a paid Cy Dashboard subscription), anyone can look at your test recordings and can easily view the password in the Test runner.

Follow this guide from Gleb, in conjunction with what you have posted above to completely protect password/sensitive data :
glebbahmutov.com/blog/keep-passwor...

Collapse
 
walmyrlimaesilv profile image
Walmyr • Edited

Hi, @abhimassive ,
For that, we can pass the option { log: false } when typing the password.
E.g., cy.get('#password').type(Cypress.env('user_password'), { log: false }).