Bitbucket:显示变量的值为秘密

发布于 2025-01-25 02:57:56 字数 697 浏览 1 评论 0 原文

对于我的一个存储库之一,我需要查看将其设置为部署安全属性的值(如 https://support.atlassian.com/bitbucket-cloud/docs/variables-and-secrets/#secred-variaiables )。有什么方法可以检索存储在那里的价值吗?

由于其所有出现都被掩盖(),我有一个想法,我想写一个价值,我怀疑我在那里保存在那里,使用“ echo”保存在那里, 。如果我看到它被变量替换为日志中,我知道这是该变量的秘密价值 - 但这将使它暴露于项目的历史记录。

还有进一步的想法吗?

For one of my repos I need to see the value I set to a secure property of a deployment (created as described in https://support.atlassian.com/bitbucket-cloud/docs/variables-and-secrets/#Secured-variables). Is there any way of retrieving the value stored there?

Since all its occurrences are masked (https://support.atlassian.com/bitbucket-cloud/docs/variables-and-secrets/#Secured-variable-masking), I had the idea of writing a value, I suspect I saved there, using "echo". If I see it being replaced in the logs by the variable, I know it's the secret value of that variable - but this would expose it to the history of my project.

Any further ideas?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

夕色琉璃 2025-02-01 02:57:56

安全免责声明:负责,使用此解决方案后,在


您始终可以以可逆的方式修改秘密并回应它,以便它找不到bitbucket在日志。在块中分配值,将字符与空格交织或用base64或您喜欢的/可用可逆的字符串函数编码值。

例如,

echo $SECRET | base64

将&amp“粘贴到您的终端并执行

echo aXRzYXNlY3JldHRvZXZlcnlib2R5Cg== | base64 -d

Security disclaimer: be responsible and after using this solution


You can always modify the secret in a reversible way and echo it so that bitbucket does not find an exact match to mask in the logs. Splitting the value in chunks, interleaving the characters with whitespace or encoding the value with base64 or your favorite/available reversible string function.

E.g.

echo $SECRET | base64

copy&paste to your terminal and do

echo aXRzYXNlY3JldHRvZXZlcnlib2R5Cg== | base64 -d
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文