Skip to content

Commit

Permalink
Add suppression of warning for MS policy
Browse files Browse the repository at this point in the history
Because we are using a direct invocation of ConvertTo-SecureString it triggers a warning by MS tools that secrets are not allowed to be checked in to our repository. This suppresses this warning.
  • Loading branch information
JamesWTruher committed Apr 2, 2019
1 parent 8389997 commit 0e35a8a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Tests/Rules/AvoidConvertToSecureStringWithPlainText.ps1
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#[SuppressMessage("Microsoft.Security", "CS002:SecretInNextLine", Justification="Test/NotASecret.")]
$supersecure = convertto-securestring "sdfdsfd" -asplaintext -force

New-Object System.Management.Automation.PSCredential -ArgumentList "username", (ConvertTo-SecureString "really secure" -AsPlainText -Force)

$sneaky = ctss "sneaky convert" -asplainText -force
$sneaky = ctss "sneaky convert" -asplainText -force

0 comments on commit 0e35a8a

Please sign in to comment.