Repository navigation
fix(picod): sanitize inherited command environments - #501
ANAMASGARD wants to merge 1 commit into
Conversation
Inherit only named shell, locale, and Python settings for every execution, then apply explicit request overrides without changing the daemon environment. Add authenticated handler regressions, supported-image HTTP checks, and compatibility documentation. Addresses volcano-sh#183; related hardening for volcano-sh#488 without execution-scoped credential isolation. Signed-off-by: Gaurav Chaudhary <chaudharygaurav2004@gmail.com>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Welcome @ANAMASGARD! It looks like this is your first PR to volcano-sh/agentcube 🎉 |
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #501 +/- ##
==========================================
+ Coverage 60.45% 62.61% +2.15%
==========================================
Files 35 35
Lines 3616 3667 +51
==========================================
+ Hits 2186 2296 +110
+ Misses 1211 1146 -65
- Partials 219 225 +6
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
What type of PR is this?
/kind bug
What this PR does / why we need it:
PicoD currently passes its complete process environment to executed commands, potentially exposing unrelated container configuration and credentials.
This change:
nilcommand environment, including when requestenvis omitted,null, or empty.Authentication, SDK interfaces, Kubernetes resources, and dependencies remain unchanged.
Which issue(s) this PR fixes:
Fixes #183
Related to #488. This PR does not resolve or close #488.
Special notes for your reviewer:
This change reduces automatic environment inheritance. It does not provide execution-specific authorization, credential expiration, revocation, or isolation between commands sharing a sandbox. Shared files, other processes, and Linux
/procremain outside its protection. The supported-image check confirmed that a dummy startup credential remains readable through the parent’s/procenvironment.Custom runtimes may require configuration changes. Passing the Python checks establishes compatibility with the tested configurations, not every existing runtime. Current Python SDK execution methods do not expose
env=; the documentation includes an authenticated raw-HTTP example for supplying explicit variables.Validation completed:
PYTHONHOME, Unicode, Python settings, subprocess lookup, concurrent requests, and request overrides.AI tools assisted with implementation, tests, documentation, and PR preparation. The changes were reviewed and tested locally.
Does this PR introduce a user-facing change?:
Yes.