Title: Rule Request: `AvoidPlaintextParameterPasswords` · Issue #2139 · PowerShell/PSScriptAnalyzer · GitHub
Open Graph Title: Rule Request: `AvoidPlaintextParameterPasswords` · Issue #2139 · PowerShell/PSScriptAnalyzer
X Title: Rule Request: `AvoidPlaintextParameterPasswords` · Issue #2139 · PowerShell/PSScriptAnalyzer
Description: Similar to the rule AvoidUsingPlainTextForPassword, passing plaintext passwords to external/binary cmdlets should be avoided. This includes cmdlets as e.g.: PS C:\> Get-Command -ParameterName Password CommandType Name Version Source ----...
Open Graph Description: Similar to the rule AvoidUsingPlainTextForPassword, passing plaintext passwords to external/binary cmdlets should be avoided. This includes cmdlets as e.g.: PS C:\> Get-Command -ParameterName Passw...
X Description: Similar to the rule AvoidUsingPlainTextForPassword, passing plaintext passwords to external/binary cmdlets should be avoided. This includes cmdlets as e.g.: PS C:\> Get-Command -ParameterName Pa...
Opengraph URL: https://github.com/PowerShell/PSScriptAnalyzer/issues/2139
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Rule Request: `AvoidPlaintextParameterPasswords`","articleBody":"Similar to the rule [`AvoidUsingPlainTextForPassword`](https://learn.microsoft.com/powershell/utility-modules/psscriptanalyzer/rules/avoidusingplaintextforpassword), passing plaintext passwords to external/binary cmdlets should be avoided.\n\nThis includes cmdlets as e.g.:\n```PowerShell\nPS C:\\\u003e Get-Command -ParameterName Password\n\nCommandType Name Version Source\n----------- ---- ------- ------\nFunction Register-ScheduledTask 1.0.0.0 ScheduledTasks\nFunction Set-ScheduledTask 1.0.0.0 ScheduledTasks\n```\n\nBut could potentially any imported (binary) cmdlet with a [bound parameter](https://stackoverflow.com/a/79634016/1701026) named `Password` and of type `String`\nKnowing that the `AvoidUsingPlainTextForPassword` rule might not capture the security risk when using a different variable name(e.g. `-Password $Wachtwoord`) or a password that is statically provided:\n\n```PowerShell\nInvoke-ScriptAnalyzer -ScriptDefinition {\nSet-ScheduledTask -TaskName 'SoftwareScan' -Trigger $Time -User 'User' -Password 'P@ssw0rd'\n}.ToString()\n```\n\nRelated:\n- Rule request: AvoidSecureStringDisclosure #1997\n- PowerShell issue: https://github.com/PowerShell/PowerShell/issues/26366 and https://github.com/PowerShell/PowerShell/issues/16502\n- Document issue: https://github.com/MicrosoftDocs/windows-powershell-docs/issues/4051","author":{"url":"https://github.com/iRon7","@type":"Person","name":"iRon7"},"datePublished":"2025-11-03T19:31:42.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/2139/PSScriptAnalyzer/issues/2139"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:f7b904d4-9a8a-9b8d-10ea-2fa7e4abc021 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D8A8:37318F:53EFDA3:712A507:6964F3AC |
| html-safe-nonce | 333ddcc539b43e49ed6c86ee7d02a23ff648ce91ecb8784e2a027f222ad0a839 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEOEE4OjM3MzE4Rjo1M0VGREEzOjcxMkE1MDc6Njk2NEYzQUMiLCJ2aXNpdG9yX2lkIjoiMTIxMzMzODk2NTk0NjcyNTI5MiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | e35180978cd59a6efc3a958c3e89033b9aa709345404b6c29c662b4e86dc5bd4 |
| hovercard-subject-tag | issue:3583438683 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/PowerShell/PSScriptAnalyzer/2139/issue_layout |
| twitter:image | https://opengraph.githubassets.com/75c3beeffdeedce9568dbd62ff2ce7465f14476eddf82daab05aa1cb2764fe68/PowerShell/PSScriptAnalyzer/issues/2139 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/75c3beeffdeedce9568dbd62ff2ce7465f14476eddf82daab05aa1cb2764fe68/PowerShell/PSScriptAnalyzer/issues/2139 |
| og:image:alt | Similar to the rule AvoidUsingPlainTextForPassword, passing plaintext passwords to external/binary cmdlets should be avoided. This includes cmdlets as e.g.: PS C:\> Get-Command -ParameterName Passw... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | iRon7 |
| hostname | github.com |
| expected-hostname | github.com |
| None | 53cd8ae9b65b7c4a0ad545ffeb3216839259a92733857ba426906c0655c5419d |
| turbo-cache-control | no-preview |
| go-import | github.com/PowerShell/PSScriptAnalyzer git https://github.com/PowerShell/PSScriptAnalyzer.git |
| octolytics-dimension-user_id | 11524380 |
| octolytics-dimension-user_login | PowerShell |
| octolytics-dimension-repository_id | 33149177 |
| octolytics-dimension-repository_nwo | PowerShell/PSScriptAnalyzer |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 33149177 |
| octolytics-dimension-repository_network_root_nwo | PowerShell/PSScriptAnalyzer |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | c140758368c0a01881f61b83770bd75cfe81e2c4 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width