Repository navigation
Conversation
The manifest name is the multipart folder. path.Join was turning a name like ../../other into a filename outside that folder.
EvanPaules
pushed a commit
to EvanPaules/anthropic-cli
that referenced
this pull request
Oct 1, 2026
This branch has not been deployed
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.
fix(skills): prevent a skill name from escaping the upload directory
Problem
A
nameinSKILL.mdreaches the multipart filename without a check that it is one path segment.path.Jointurns../../otherinto../../other/SKILL.md. A receiver that treats that name as a tree path can place the file outside the skill folder, when someone applies a skill whose manifest they did not write.Fix
loadSkillDirrejects a name that contains/,\, or..before the bundle is built. That keeps every uploaded filename under one directory. The patch is limited to that check inskill.go.Verification
TestSkillNameCannotBeAPathloads../../other,/other,..\other,foo/bar,.., andfoo..bar, and each one is refused.pr-writerstill uploads aspr-writer/SKILL.md.go test ./internal/declarative/claude/ -count=1— passed.Compatibility
A skill whose
nameis already a single segment is unchanged. A name that contains/,\, or..fails at load, before any upload.foo..baris refused because it contains...