Skip to content
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

Installation steps for Scoop itself (security considerations) #2583

Closed
bayotop opened this issue Sep 12, 2018 · 1 comment
Closed

Installation steps for Scoop itself (security considerations) #2583

bayotop opened this issue Sep 12, 2018 · 1 comment

Comments

@bayotop
Copy link

bayotop commented Sep 12, 2018

Hi,

The suggested installation steps seem rather dangerous. Directly executing a PowerShell script downloaded from the internet, possibly ignoring certificate errors, is the equivalent of piping wget into shell.

When installing programs via scoop their integrity is checked, which is a good thing. I believe a similar approach should also apply for the installation as well (see https://github.com/lukesampson/scoop/blob/master/bin/install.ps1#L30 or https://github.com/lukesampson/scoop/blob/master/bin/install.ps1#L43):

$core_url = 'https://raw.github.com/lukesampson/scoop/master/lib/core.ps1'
Write-Output 'Initializing...'
Invoke-Expression (new-object net.webclient).downloadstring($core_url)
...
$zipurl = 'https://github.com/lukesampson/scoop/archive/master.zip'

Additionally, it would be nice to publish a hash of the installation script to verify it's integrity, presumably via other means than this repository.

I'm happy to hear other opinions / suggestions on this. Thanks!

bayotop referenced this issue in Kentico/oss-automation Sep 12, 2018
@r15ch13
Copy link
Member

r15ch13 commented Sep 12, 2018

These are valid concerns! 👍

Adding an integrity check for core.ps1 and install.ps1 itself are possible, but for the master.zip it's a bit more complicated. To archive this we might have to use GitHub releases.

After running scoop update for the first time it replaces the master.zip stuff with a git repo of itself. Maybe we could change the installation process so it uses git from the start.

@rashil2000 rashil2000 changed the title Installation steps (security considerations) Installation steps for Scoop itself (security considerations) Jan 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants