feat!: Remove root-user command in favor of user command#201
Merged
jarfernandez merged 3 commits intomainfrom Mar 16, 2026
Merged
feat!: Remove root-user command in favor of user command#201jarfernandez merged 3 commits intomainfrom
root-user command in favor of user command#201jarfernandez merged 3 commits intomainfrom
Conversation
The `user` command (added in v0.21.0) fully supersedes `root-user`. Without flags or policy, `user` performs the exact same non-root check. Removing `root-user` simplifies the CLI, reduces maintenance, and avoids confusion about which command to use. BREAKING CHANGE: The `root-user` command has been removed. Use `user` instead, which provides the same basic non-root check plus additional policy-based validation (UID ranges, blocked users, numeric UID requirements). - Delete `root_user.go`, `root_user_test.go`, and `RootUserDetails` struct - Remove `root-user` from `all` command (check count: 11 → 10) - Update all config files, tests, CI workflow, and documentation - Bump version to v1.0.0 in release-please manifest
The `go fix` hook runs `go fix ./...` before linting and testing, ensuring code always uses modern Go patterns (e.g., `new(v)` instead of helper functions marked with `//go:fix inline`). The `modernize` linter in `golangci-lint` v2 provides the same detection in CI.
`go fix` rewrites code that the linter then validates. Running it after `golangci-lint` meant the linter analyzed pre-modernization code.
This was referenced Mar 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
root-usercommand: Theusercommand (added in v0.21.0) fully supersedesroot-user. Without flags or policy,userperforms the exact same non-root check. Removingroot-usersimplifies the CLI, reduces maintenance, and avoids confusion about which command to useroot-userartifacts:root_user.go,root_user_test.go,RootUserDetailsstruct, render function, config constants, and all references in config files, CI workflow, and documentationallcommand: Check count drops from 11 to 10. All orchestration tests, config tests, and help text updated accordingly.github/release-please-manifest.jsonto signal API stabilityBREAKING CHANGE
The
root-usercommand has been removed. Useuserinstead, which provides the same basic non-root check plus additional policy-based validation (UID ranges, blocked users, numeric UID requirements).Test plan
go test ./...)0:somegroup) ported touser_test.gogolangci-lintpasses with 0 issuespre-commit run --all-filespassescheck-image --helpdoes NOT showroot-usercheck-image root-user nginx:latestreturns "unknown command" (exit 2)check-image user nginx:latestworks (basic non-root check)check-image all nginx:latest --skip registry,labels,platform -o jsonruns 7 checks (no root-user)🤖 Generated with Claude Code