Checksum comparisons for Install-ChocolateyInstallPackage
- Dominant language
- C#
- Stars
- 11.5k
- Forks
- 960
- PR merge metrics
- No merged PRs in 30d
Description
Whilst _Install-ChocolateyPackage_ includes the ability to check file hashes for software
_Install-ChocolateyInstallPackage_ currently does not. As I understand it, this stemmed from design whereby use of _Install-ChocolateyInstallPackage_ assumed that you are embedding the installer into the nupkg and that to install without downloading first implied that it was coming from a trusted local source.
However there are circumstances where:
- It may not be assumed there hasn't been tampering/malware with a file storage areas within a large organisation
- It may be desirable to directly install a large setup file without embedding and without downloading/caching.
As a workaround, it is of course possible to use _Get-Filehash_ within _ChocolateyInstall.ps1_ against the intended file, but ideally the ability to validate checksums within chocolatey would be desirable.
As some larger local installations may not be just a single file, it may also be desirable to have it recursively check a folder of dependencies.
Contributor guide
Research direction
Start by comparing the checksum behavior of Install-ChocolateyPackage with Install-ChocolateyInstallPackage, and inspect how ChocolateyInstall.ps1 currently uses Get-FileHash as a workaround. Clarify with maintainers whether validation should cover only a single installer or also dependency folders, then define tests and documentation for the agreed behavior before implementation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- powershell
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100