fix(controller): decouple skills from privileged sandbox#1998
Open
mesutoezdil wants to merge 5 commits into
Open
fix(controller): decouple skills from privileged sandbox#1998mesutoezdil wants to merge 5 commits into
mesutoezdil wants to merge 5 commits into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Updates the agent manifest generation and test fixtures so that configuring skills no longer implicitly makes the main container privileged; privileged mode is now reserved for explicit code-execution sandboxing.
Changes:
- Removed
securityContext.privileged: truefrom golden manifest outputs for agents with skills/git-skills. - Updated security-context tests to assert that skills do not set privileged security context on the main container.
- Simplified
buildSkillsRuntimeby removing the side-effect that forced code-execution isolation.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| go/core/internal/controller/translator/agent/testdata/outputs/agent_with_skills.json | Updates golden output to no longer include privileged main-container security context when skills are present. |
| go/core/internal/controller/translator/agent/testdata/outputs/agent_with_git_skills.json | Same golden output update for git-based skills. |
| go/core/internal/controller/translator/agent/security_context_test.go | Adjusts expectations: skills should not imply privileged main-container security context. |
| go/core/internal/controller/translator/agent/manifest_builder.go | Removes the “skills force code-exec isolation” coupling by dropping the needCodeExecIsolation mutation. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
e7d5594 to
a856ab6
Compare
skills init container handles loading, main container does not need privileged=true. only BashTool (cfg.GetExecuteCode) needs it. fixes kagent-dev#1997 Signed-off-by: mesutoezdil <mesudozdil@gmail.com>
a856ab6 to
85a24a3
Compare
Reduce multi-line comments to single lines. Replace the weak if-not-nil guard with a direct assert.Nil so the test actually fails when the security context is unexpectedly set. Signed-off-by: mesutoezdil <mesudozdil@gmail.com>
ef26eb5 to
8a35f7f
Compare
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.
Skills are loaded by the init container. The main container does not
need privileged=true for skill loading.
Before this change, any agent with skills got privileged=true on the
main container, which breaks restricted PSS clusters.
Now only BashTool sandbox (cfg.GetExecuteCode) sets privileged=true.
Fixes #1997