Skip to content

fix(controller): decouple skills from privileged sandbox#1998

Open
mesutoezdil wants to merge 5 commits into
kagent-dev:mainfrom
mesutoezdil:fix/skills-privileged-pss
Open

fix(controller): decouple skills from privileged sandbox#1998
mesutoezdil wants to merge 5 commits into
kagent-dev:mainfrom
mesutoezdil:fix/skills-privileged-pss

Conversation

@mesutoezdil

Copy link
Copy Markdown
Contributor

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

Copilot AI review requested due to automatic review settings June 11, 2026 16:21
@github-actions github-actions Bot added the bug Something isn't working label Jun 11, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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: true from 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 buildSkillsRuntime by 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.

Comment thread go/core/internal/controller/translator/agent/security_context_test.go Outdated
@mesutoezdil mesutoezdil force-pushed the fix/skills-privileged-pss branch from e7d5594 to a856ab6 Compare June 11, 2026 16:22
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>
@mesutoezdil mesutoezdil force-pushed the fix/skills-privileged-pss branch from a856ab6 to 85a24a3 Compare June 11, 2026 16:23
mesutoezdil and others added 3 commits June 12, 2026 09:24
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>
@mesutoezdil mesutoezdil force-pushed the fix/skills-privileged-pss branch from ef26eb5 to 8a35f7f Compare June 12, 2026 21:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Skills path sets privileged: true unconditionally, incompatible with restricted-PSS clusters

2 participants