When the ability to show remembered arguments in Chocolatey GUI was
first introduced, code from the set_package_config_for_upgrade (which
was renamed to SetConfigFromRememberedArguments) method was borrowed,
as it was doing very similar work. However, the code that was brought
over to Chocolatey GUI failed to realise that after splitting the
arguments on " --", when passed into the
arguments_contain_sensitive_information (which was renamed to
SensitiveArgumentsProvided) that a sensitive variable would no longer
be detected as this method expects that all arguments under test start
with a "-".
Motivation and Context
Ensure that no sensitive persisted arguments are displayed through Chocolatey GUI.
Testing
Enable the Chocolatey feature to use remembered arguments
Install a package using Chocolatey CLI where a sensitive argument is passed in, for example `choco install packageA --user=bob --password=bill"
Open Chocolatey GUI and open the details window for the package that you just installed
Click the "View Package Arguments" button
Ensure that the value of the password argument is not shown
Operating Systems Testing
Windows 10
Change Types Made
[x] Bug fix (non-breaking change).
[ ] Feature / Enhancement (non-breaking change).
[ ] Breaking change (fix or feature that could cause existing functionality to change).
Description Of Changes
When the ability to show remembered arguments in Chocolatey GUI was first introduced, code from the set_package_config_for_upgrade (which was renamed to SetConfigFromRememberedArguments) method was borrowed, as it was doing very similar work. However, the code that was brought over to Chocolatey GUI failed to realise that after splitting the arguments on " --", when passed into the arguments_contain_sensitive_information (which was renamed to SensitiveArgumentsProvided) that a sensitive variable would no longer be detected as this method expects that all arguments under test start with a "-".
Motivation and Context
Ensure that no sensitive persisted arguments are displayed through Chocolatey GUI.
Testing
Operating Systems Testing
Windows 10
Change Types Made
Change Checklist
Related Issue
Fixes #1000