chore(execd): complete the work for #332, and fix the linter errors.#385
chore(execd): complete the work for #332, and fix the linter errors.#385Pangjiping wants to merge 1 commit intoalibaba:mainfrom
Conversation
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b424f6ff8a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| Uid *uint32 `json:"uid,omitempty"` | ||
| Gid *uint32 `json:"gid,omitempty"` |
There was a problem hiding this comment.
Require UID when accepting GID in RunCommandRequest
Allowing gid to be set independently introduces a credential bug: this request is now forwarded to runtime, where buildCredential creates a non-nil syscall.Credential with Gid set but leaves Uid at its zero value; on Linux, a non-nil credential causes setuid(cred.Uid) to run, so gid-only requests attempt setuid(0) and can either fail with EPERM or run as root unexpectedly. This makes gid-only command executions unsafe/unreliable unless validation enforces uid whenever gid is provided (or runtime fills Uid with the current UID).
Useful? React with 👍 / 👎.
Summary
Testing
Breaking Changes
Checklist