Skip to content

Take Bug fixes to Master #297

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

Merged
merged 3 commits into from
Aug 25, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Rules/AvoidUsingPlainTextForPassword.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public IEnumerable<DiagnosticRecord> AnalyzeScript(Ast ast, string fileName)
// Finds all ParamAsts.
IEnumerable<Ast> paramAsts = ast.FindAll(testAst => testAst is ParameterAst, true);

List<String> passwords = new List<String>() {"Password", "Passphrase"};
List<String> passwords = new List<String>() {"Password", "Passphrase", "Auth", "Cred", "Credential"};

// Iterrates all ParamAsts and check if their names are on the list.
foreach (ParameterAst paramAst in paramAsts)
Expand Down
4 changes: 3 additions & 1 deletion Tests/Rules/AvoidUsingPlainTextForPassword.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@
[securestring[]]
$passwords,
$passphrases,
$passwordparam
$passwordparam,
$credential,
$auth
)

Begin
Expand Down
2 changes: 1 addition & 1 deletion Tests/Rules/AvoidUsingPlainTextForPassword.tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ $noViolations = Invoke-ScriptAnalyzer $directory\AvoidUsingPlainTextForPasswordN
Describe "AvoidUsingPlainTextForPassword" {
Context "When there are violations" {
It "has 3 avoid using plain text for password violations" {
$violations.Count | Should Be 3
$violations.Count | Should Be 5
}

It "has the correct violation message" {
Expand Down