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

fix(dev-env): disallow running dev-env as root #2173

Open
wants to merge 1 commit into
base: trunk
Choose a base branch
from

Conversation

sjinks
Copy link
Member

@sjinks sjinks commented Dec 25, 2024

Description

This PR adds a check that dev env commands are not running under the root user. Using the root user creates numerous issues (e.g., permissions, user mapping, etc), often resulting in broken environments.

NB: we may want to improve the wording.

Ref: 198752-z

Pull request checklist

New release checklist

Steps to Test

Check out the PR, build vip-cli, and run (this is a Linux version; I am not sure how to do that on a Mac):

sudo -E --preserve-env=PATH $(which vip) dev-env ls

The expected result is

This script should not be run as root. Exiting.

@sjinks sjinks requested a review from Copilot December 25, 2024 08:29
@sjinks sjinks self-assigned this Dec 25, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 1 out of 1 changed files in this pull request and generated no comments.

Copy link
Contributor

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

OpenSSF Scorecard

PackageVersionScoreDetails

Scanned Files

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant