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

Remove sshpass from denylist #15879

Closed
1 task done
sprive opened this issue Aug 16, 2023 · 9 comments · Fixed by #15979
Closed
1 task done

Remove sshpass from denylist #15879

sprive opened this issue Aug 16, 2023 · 9 comments · Fixed by #15979
Labels
features New features outdated PR was locked due to age

Comments

@sprive
Copy link

sprive commented Aug 16, 2023

Verification

Provide a detailed description of the proposed feature

Use fdesetup status to confirm the Brew user has Filevault set to On. This will signify the user's scripts are protected at rest using OS level encryption. If Off, then blacklist sshpass. If On, then issue a caution and a prompt to allow continuing.

What is the motivation for the feature?

Embedded Linux devices do not allow you to install SSH keys (read-only filesystems are quite common). Yet you must still automate against these targets.

How will the feature be relevant to at least 90% of Homebrew users?

For the popular workaround, Brew users are being diverted to tap random Github repos.
This means non-novice users to have to vet what the repo is doing, but novice users are blindly pulling in unvetted repos..

What alternatives to the feature have been considered?

Linux

@sprive sprive added the features New features label Aug 16, 2023
@sprive
Copy link
Author

sprive commented Aug 16, 2023

  1. unblacklist sshpass #13986
  2. Add SSHPASS #13254
  3. something something sshpass. #7994
  4. Insecure sshpass behavior #6236
  5. Add sshpass #5167
  6. Consider removing sshpass from the blacklist #4198

It looks like ThumbsUp voting is disabled on these, which makes it difficult to measure community sentiment. But the current mechanism to discourage use does impact a lot of folk.

@sprive
Copy link
Author

sprive commented Aug 16, 2023

From #4198: "I think this is the best fit for now. You can create a sshpass formula in a tap and if it's widely used we may consider it being added into Homebrew/core."

Is that usage number published, and has sshpass reached that criteria?

@MikeMcQuaid
Copy link
Member

Thanks for the issue @sprive!

Is that usage number published, and has sshpass reached that criteria?

You can see on https://formulae.brew.sh/analytics/install/365d/. sshpass doesn't show up until ~1000 but it occurs a few times after that.

Given that, unless other @Homebrew/maintainers object, I'm game to remove this blacklist and add it into Homebrew/homebrew-core with suitable caveats.

@carlocab
Copy link
Member

Given that, unless other @Homebrew/maintainers object, I'm game to remove this blacklist and add it into Homebrew/homebrew-core with suitable caveats.

This is fine with me, but I'd like to understand more what the security concerns regarding sshpass are exactly too. (But presumably this will show up in the proposed caveats.)

@sprive
Copy link
Author

sprive commented Aug 16, 2023

Thanks! Raising the security concerns I'm aware of, and presenting them as copy pasta, if this looks suitable..:


Using SSHpass presents the risk of sensitive server credentials becoming stolen by other accounts or software running on your Mac. If these credentials are work related or sensitive, before using SSHpass please discuss this with your Compliance team.

When possible, using staged SSH keys is always easier and more secure than SSHpass. Use FileVault to encrypt your disk: if your Mac is stolen, at least the contents are unreadable to others. With your SSH targets, avoid using identical credentials on multiple systems. If you use source control, .gitignore can block committing of filenames you specify, so they do not accidentally become public.

Caveats:

  • When supplying credentials to your SSH command, it is slightly more secure to use -f [filename], or -e ($SSHPASS env var) than the -p option. This is also a general best practice (keep secrets out of code, in case the code is shared or committed to source control).
  • It is always a risk that any accounts, users or processes on your Mac can expose your plaintext password file or ENV vars.

Probably too lengthy for the command warning. Cheers.

@Gailchester

This comment was marked as off-topic.

@github-actions
Copy link

github-actions bot commented Sep 7, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@github-actions github-actions bot added the stale No recent activity label Sep 7, 2023
@sprive
Copy link
Author

sprive commented Sep 7, 2023

What now needs to happen for this proposed change to move forward?

@github-actions github-actions bot removed the stale No recent activity label Sep 7, 2023
@MikeMcQuaid MikeMcQuaid changed the title Confirm FileVault is On, then "are you sure" prompt to allow sshpass install. Remove sshpass from denylist Sep 7, 2023
@MikeMcQuaid
Copy link
Member

Someone needs to open the relevant PR.

@github-actions github-actions bot added the outdated PR was locked due to age label Oct 9, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 9, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
features New features outdated PR was locked due to age
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants