Skip to content

PSAvoidUsingPlainTextForPassword is overzealous and wrong #371

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Jaykul opened this issue Nov 25, 2015 · 2 comments
Closed

PSAvoidUsingPlainTextForPassword is overzealous and wrong #371

Jaykul opened this issue Nov 25, 2015 · 2 comments

Comments

@Jaykul
Copy link
Contributor

Jaykul commented Nov 25, 2015

I have this parameter in one of my functions:

        # The user name to fetch roles for
        [Parameter(Position=1, Mandatory=$True, ValueFromPipelineByPropertyName=$true, ParameterSetName='ByName')]
        [string]$AuthenticatedUser,

It causes a Warning:

PSAvoidUsingPlainTextForPassword: Parameter '$AuthenticatedUser' should use SecureString, otherwise this will expose sensitive information. See ConvertTo-SecureString for more information.

This isn't a password. It's a USER NAME. Go Away.

@kilasuit
Copy link
Contributor

This is due to the way the rule has been built as it looks for "Auth" in any of the parameters and if it is of a string type will throw this Warning

However I will submit a PR to remove this as I agree that Auth shouldnt really be in list of keywords it searches for - the rest however I think are about right

raghushantha added a commit that referenced this issue Nov 25, 2015
@raghushantha
Copy link
Member

Thanks for the fix, Ryan.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants