Azure DevOps Pipeline Script中的租户ID被审查



我有一个进入密钥库的管道,并将结果字符串打印到ADO执行日志。字符串的一部分包含租户ID,莫名其妙地被替换为"***"

https://login.microsoftonline.com/***/oauth2/token

代码并不复杂:

$var = Get-AzKeyVaultSecret -VaultName $(vaultname) -Name $(secretname) -AsPlainText
Write-Host $var

撇开管道的安全问题不谈,我如何防止它被审查?

看起来您的一个秘密与您的帐篷id具有相同的值。在这种情况下,你无法克服这一点,因为秘密被掩盖了,不会在日志中透露它们。但是,这只是用于日志记录,并且后台url是正确的。

请在这里核对

echo "You can use macro replacement to get secrets, and they'll be masked in the log: $(secretSauce)"

生产:

You can use macro replacement to get secrets, and they'll be masked in the log: ***

最新更新