PowerShell / PowerShell/PSScriptAnalyzer

AvoidUsingPlainTextForPassword docs do not cover all checked parameter names

Open
#1,565 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Area - Documentation Area - Rules Up-for-Grabs
Dominant language
C#
Stars
2.2k
Forks
414
Avg merge
13h 1m
Merged PRs (30d)
2

Description

I have a script parameter that holds a path to the encrypted credential file named $CredentialFile for which I get the warning:

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

There is no reason for me use SecureString here and I cannot think of a better alternative to the parameter name, so it would be nice to suppress this message for this particular instance, but not to the whole file or project. Besides, the documentation for PSAvoidUsingPlainTextForPassword needs to include Credential and whatever other strings it gets triggered of, since it only mentions one word: Password.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the PSAvoidUsingPlainTextForPassword rule and its documentation entry; no file or test path is named in the issue. Review how parameter names such as CredentialFile are covered, then update the documentation to describe all applicable names and the supported way to suppress a single warning, if documented behavior permits it.

Written by the indexing model from the issue text.

Assessment

Tech stack
powershell
Domain
documentation, tooling
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.