Skip to content

[dotnet-port-fixes] Skip symlinked file-skill assets - #834

Merged
George Adams (gdams) merged 2 commits into
mainfrom
copilot/fsskills-symlink-skip-ed0c29c88befa75e
Aug 18, 2026
Merged

[dotnet-port-fixes] Skip symlinked file-skill assets#834
George Adams (gdams) merged 2 commits into
mainfrom
copilot/fsskills-symlink-skip-ed0c29c88befa75e

Conversation

@michelle-clayton-work

Copy link
Copy Markdown
Contributor

Summary

Aligned agent/skills/fsskills with the upstream .NET hardening in microsoft/agent-framework#7540 by skipping symlinked SKILL.md files during skill discovery and skipping symlinked resource/script files during asset discovery. This keeps file-backed skills from following linked content outside the intended skill tree without changing the Go public API.

Ported .NET PRs

Breaking Changes

No. Existing exported Go symbols and signatures are unchanged; the change only excludes symlinked file-skill assets from discovery.

Tests and Examples

  • go test ./agent/skills/fsskills
  • Added parity coverage for symlinked SKILL.md, resource, and script files

Notes

This PR intentionally ports the narrow symlink-screening behavior that maps cleanly to the current Go io/fs implementation. It does not introduce API changes or broader file-system inspection behavior beyond the discovered file entries themselves.

Generated by .NET to Go Fixes and Test Porting Agent · gpt54 · 176.2 AIC · ⌖ 11.6 AIC · ⊞ 24.2K ·

Closes #817

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

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

This PR hardens agent/skills/fsskills skill and asset discovery by skipping symlinked SKILL.md files (skill discovery) and skipping symlinked resource/script entries (asset discovery), aligning behavior with the upstream .NET hardening while keeping the Go public API unchanged.

Changes:

  • Updated skill discovery to detect SKILL.md via ReadDir and ignore symlinked SKILL.md.
  • Updated asset scanning to ignore symlinked entries during resource/script discovery.
  • Added tests covering symlinked SKILL.md, resource files, and script files.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
agent/skills/fsskills/source.go Implements symlink skipping for skill and asset discovery.
agent/skills/fsskills/source_test.go Adds tests to ensure symlinked SKILL.md and resource files are ignored.
agent/skills/fsskills/source_script_test.go Adds a test to ensure symlinked script files are ignored.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread agent/skills/fsskills/source.go
@github-actions

This comment has been minimized.

@github-actions github-actions Bot added the parity-approved Go API consistency review found no parity issues label Aug 12, 2026
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@github-actions github-actions Bot added area:agent Changes files in the agent area size:large At most 300 changed lines across at most 10 files labels Aug 18, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Parity Review: No Issues

This PR ports the symlink-screening hardening from .NET microsoft/agent-framework#7540 into the Go agent/skills/fsskills package.

Scope: Only source.go (internal discovery logic) and test files changed. No exported Go symbols or user-visible behaviors added or removed.

Upstream parity: Aligns Go behavior with .NET — both now skip symlinked SKILL.md, resource, and script files during skill discovery. Behavioral backport, not a new feature; cross-SDK parity preserved.

Labels: parity-approved remains correct. public-api-change not warranted.

Generated by Go API Consistency Review Agent for #834 · sonnet46 · 9.64 AIC · ⌖ 5.53 AIC · ⊞ 5.7K ·

@github-actions github-actions Bot added kind:code Changes production behavior or code kind:tests Changes tests, fixtures, or test infrastructure failed-auto-risk Automatic risk classification was inconclusive or failed risk:medium Contained production impact requiring normal review depth and removed failed-auto-risk Automatic risk classification was inconclusive or failed labels Aug 18, 2026
@gdams
George Adams (gdams) added this pull request to the merge queue Aug 18, 2026
Merged via the queue into main with commit 8bd785d Aug 18, 2026
37 checks passed
@gdams
George Adams (gdams) deleted the copilot/fsskills-symlink-skip-ed0c29c88befa75e branch August 18, 2026 08:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:agent Changes files in the agent area kind:code Changes production behavior or code kind:tests Changes tests, fixtures, or test infrastructure parity-approved Go API consistency review found no parity issues risk:medium Contained production impact requiring normal review depth size:large At most 300 changed lines across at most 10 files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[dotnet-port-fixes] Skip symlinked file-skill assets

3 participants