Conversation
There was a problem hiding this comment.
Performed full review of 5b79420...253b999
4 files reviewed | 1 comments | Review on Mesa | Edit Reviewer Settings
| if gidStr != "" { | ||
| if gOverride, err := strconv.ParseUint(gidStr, 10, 32); err == nil { | ||
| gid64 = gOverride | ||
| } |
There was a problem hiding this comment.
This logic silently ignores non-numeric group specifiers. If a user passes something like "1000:wheel", the "wheel" group name will be silently ignored rather than being looked up or causing an error. Consider either:
- Adding group name lookup similar to user lookup, or
- Returning an error for non-numeric gid overrides to make the behavior explicit
Suggested change
| } | |
| if gidStr != "" { | |
| if gOverride, err := strconv.ParseUint(gidStr, 10, 32); err == nil { | |
| gid64 = gOverride | |
| } else { | |
| return nil, fmt.Errorf("gid override must be numeric, got %q", gidStr) | |
| } | |
| } |
Type: Logic | Severity: Medium
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.
the main / public Kernel API updates merged yesterday had some feedback on these endpoints--this syncs those changes in
I also filled out the implementation of process exec and added / refactored tests
https://github.com/onkernel/kernel/pull/416
TL;DR
Syncs API endpoints with recent public API updates and implements the
process.execendpoint, including support for running commands as a specific user.Why we made these changes
To incorporate feedback and align with recent updates to the main public Kernel API.
What changed?
openapi.yamland the auto-generatedoapi.goto match the latest public API contract.process.execendpoint, adding logic tobuildCmdto handle execution as root (AsRoot) or a specific user (AsUser).ProcessExecendpoint.AsRootandAsUserfunctionality and refactored existing tests usingstretchr/testify.Description generated by Mesa. Update settings