3 Commits
Author SHA1 Message Date
Willie c5544c5e65 fix(install): preserve unsafe blob subdirs for validation
Trim SKILL.md suffixes without filepath.Dir so traversal segments remain visible to SEC003 subdir validation. Add regression coverage for GitHub, GitLab, and Bitbucket blob-style skill URLs.
2026-06-15 11:12:44 +08:00
Willie d21d31e86c test(install): cover unsafe subdirs across source parsers
Add SEC003 regression cases for SSH, file, Azure, and generic HTTPS source parser branches so traversal rejection stays covered beyond the GitHub parser.
2026-06-15 11:12:44 +08:00
jnhu 087b5ee846 fix(install): validate repo subdir and source name in ParseSourceWithOptions
Reject unsafe subdirs that contain path traversal (..), NUL bytes,
control characters, backslashes, absolute paths, and URL-encoded
traversal (single, double, or overly deep encoding). Validate derived
source names and CloneURLs for NUL and control characters.

SEC003: github.com/owner/repo/../../etc/passwd previously produced a
Source with Subdir containing traversal segments. Now rejected.
2026-06-15 11:12:44 +08:00