/
githubmirror
/
PowerShell
Обзор
Документация
Войти
/
githubmirror
/
PowerShell
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
test/powershell/Modules/Microsoft.PowerShell.Utility/ConvertTo-SecureString.Tests.ps1
18 строк
669 B
Patrick Meinecke
Suppress false positive PSScriptAnalyzer warnings in tests and build scripts (#25864)
19 авг 2025, 09:51
Не верифицирован
19 авг 2025, 09:51
c5f2446
Код
Авторство
О чём код?
# Copyright (c) Microsoft Corporation. # Licensed under the MIT License. [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingConvertToSecureStringWithPlainText', '')] param() Describe "ConvertTo--SecureString" -Tags "CI" { Context "Checking return types of ConvertTo--SecureString" { It "Should return System.Security.SecureString after converting plaintext variable"{ #[SuppressMessage("Microsoft.Security", "CS002:SecretInNextLine", Justification="Demo/doc/test secret.")] $PesterTestConvert = (ConvertTo-SecureString "plaintextpester" -AsPlainText -Force) $PesterTestConvert | Should -BeOfType securestring } } }