chocolatey / package-validator

Windows service to validate packages conform to package standards
Apache License 2.0
31 stars 29 forks source link

AdminTagShouldBeIncludedWhenUsingAdminHelpersGuideline appears to be matching substrings #168

Closed flcdrg closed 7 years ago

flcdrg commented 7 years ago

I think the code will match Uninstall-ChocolateyPackage when searching for install-ChocolateyPackage.

The uninstall function is not listed as requiring admin permission

AdmiringWorm commented 7 years ago

Looking at the source that would indeed be true as it seem to only check if the script contains install-chocolateypackage. https://github.com/chocolatey/package-validator/blob/master/src/chocolatey.package.validator/infrastructure.app/rules/AdminTagShouldBeIncludedWhenUsingAdminHelpersGuideline.cs#L41

Still, I personally think that a match for Uninstall-ChocolateyPackage should require the admin tag though.

ferventcoder commented 7 years ago

This one is being removed as a requirement, so this should not come up.

ferventcoder commented 7 years ago

169