Skip to content

fix(agentplugins): reject unsafe and conflicting skill selections - #2505

Merged
EItanya merged 2 commits into
kagent-dev:mainfrom
Whxuan0701:fix/agentplugins-skill-selection-validation
Aug 24, 2026
Merged

fix(agentplugins): reject unsafe and conflicting skill selections#2505
EItanya merged 2 commits into
kagent-dev:mainfrom
Whxuan0701:fix/agentplugins-skill-selection-validation

Conversation

@Whxuan0701

Copy link
Copy Markdown
Contributor

Summary

  • reject skill selections that are empty, traversal-like, or contain path separators
  • reject duplicate skill names across standalone skills and selected plugin skills before fetching artifacts
  • canonicalize existing and not-yet-created paths during containment checks so macOS /var aliases do not reject valid packages

This keeps Agent Plugin materialization deterministic and prevents one selected skill from overwriting another. It does not change the Agent Plugins schema or artifact source formats.

Testing

  • cd go && go test ./core/v2/agentplugins ./adk/pkg/mcp ./core/v2/translator
  • cd go && go vet ./core/v2/agentplugins
  • git diff --check

Risk / Notes

  • The new validation runs before any artifact is fetched or copied.
  • Existing plugin and MCP behavior is unchanged for valid selections.
  • The canonical-path handling preserves the existing symlink escape checks while making containment portable across macOS temporary-directory aliases.

Signed-off-by: Whxuan0701 <102815982+Whxuan0701@users.noreply.github.com>
@Whxuan0701
Whxuan0701 requested a review from a team as a code owner August 20, 2026 03:58
@github-actions github-actions Bot added the bug Something isn't working label Aug 20, 2026
Signed-off-by: Eitan Yarmush <eitan.yarmush@solo.io>
@EItanya
EItanya merged commit 7c72ecd into kagent-dev:main Aug 24, 2026
28 checks passed
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.

2 participants