Conversation
|
/evaluate |
There was a problem hiding this comment.
Pull request overview
This PR adjusts the skill-validator’s file reference depth/traversal checks so that when repo traversal is explicitly allowed, parent-directory (..) references aren’t incorrectly subjected to the “max 1 directory deep” rule—intended for keeping portable skills self-contained.
Changes:
- Updates
SkillProfilerto suppress depth checking for references that include..whenAllowRepoTraversalis enabled. - Updates/extends unit tests to distinguish between deep external refs (allowed with repo traversal) vs deep internal refs (still rejected).
Show a summary per file
| File | Description |
|---|---|
| eng/skill-validator/src/Check/SkillProfiler.cs | Changes traversal/depth validation flow to skip depth checks for .. refs when repo traversal is allowed. |
| eng/skill-validator/tests/Check/SkillProfileTests.cs | Updates and adds tests for the updated repo-traversal behavior. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comments suppressed due to low confidence (1)
eng/skill-validator/tests/Check/SkillProfileTests.cs:339
- The new coverage verifies that
..-based external refs don't trigger depth errors, but it doesn't cover the important edge case where a path contains..yet still resolves inside the skill directory (e.g.references/../refs/utils/foo/readme.md). Add a test that expects the depth error in that scenario (withAllowRepoTraversal = true) so the implementation can't accidentally allow deep internal refs by inserting..segments.
[Fact]
public void AllowRepoTraversalAllowsDeepExternalRefs()
{
var content = "---\nname: test-skill\n---\n# Title\n1. Step\n```bash\necho\n```\nSee [ref](../../../documentation/guides/setup.md)\n" + new string('x', 4000);
var options = new CheckOptions { AllowRepoTraversal = true };
var profile = SkillProfiler.AnalyzeSkill(MakeSkill(content), options);
Assert.DoesNotContain(profile.Errors, e => e.Contains("traversal") || e.Contains("directories deep"));
}
[Fact]
public void AllowRepoTraversalStillChecksDepthForInternalRefs()
{
var content = "---\nname: test-skill\n---\n# Title\n1. Step\n```bash\necho\n```\nSee [ref](refs/utils/foo/readme.md)\n" + new string('x', 4000);
var options = new CheckOptions { AllowRepoTraversal = true };
var profile = SkillProfiler.AnalyzeSkill(MakeSkill(content), options);
Assert.Contains(profile.Errors, e => e.Contains("directories deep"));
}
- Files reviewed: 2/2 changed files
- Comments generated: 1
|
/evaluate |
Skill Validation Results
[1] (Plugin) Quality unchanged but weighted score is -7.9% due to: tokens (19082 → 59936), tool calls (0 → 2)
Model: claude-opus-4.6 | Judge: claude-opus-4.6 🔍 Full Results - additional metrics and failure investigation steps ▶ Sessions Visualisation -- interactive replay of all evaluation sessions |
Followup of #524
Motivation
When we want to allow traversal of paths outside of the skill folder (in case of repo specific skills, that are not meant to be shareable) - we should not check for the depth of the path, unless it is in the current skill folder - otherwise the depth check would snap