【问题标题】:How can I hide passwords or use secrets in Testcafe?如何在 Testcafe 中隐藏密码或使用机密?
【发布时间】:2020-01-08 10:11:22
【问题描述】:

我目前正在测试一个登录页面,因此我需要在代码中隐藏密码,因为我们公司禁止在 Git 中签入密码。

是否有任何已知的模式可以让我在 Testcafe 中隐藏密码或使用机密?

【问题讨论】:

    标签: security testing automated-tests passwords testcafe


    【解决方案1】:

    您可以通过环境变量传递敏感数据。

    【讨论】:

      【解决方案2】:

      尝试使用 cryptr 库,这里有更多详细信息 - https://www.npmjs.com/package/cryptr 并且可以将使用的密钥推送到环境/数据库中。

      【讨论】:

        猜你喜欢
        • 2010-10-10
        • 2020-05-14
        • 2017-07-29
        • 1970-01-01
        • 2018-05-27
        • 1970-01-01
        • 2021-11-28
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多