security: add path traversal protection to installers#1
Open
asharijuang wants to merge 2 commits intomainfrom
Open
security: add path traversal protection to installers#1asharijuang wants to merge 2 commits intomainfrom
asharijuang wants to merge 2 commits intomainfrom
Conversation
… file structure and setup instructions
…tallers Skill names from GitHub API responses and local filesystem are now validated to contain only safe characters (alphanumeric, hyphens, underscores). File paths are checked for traversal sequences (..) and absolute paths before use in rm -rf, cp, mkdir, and curl operations. Adds SECURITY.md with guidance for contributors and users. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.
Summary
validate_safe_name/validate_safe_path) for skill names and file paths ininstall.shandinstall.ps1../../.ssh/authorized_keys)SECURITY.mdwith contributor security checklist and recommended secure installation methodREADME.mdinstallation sectionVulnerabilities Addressed
rm -rf,cp -R,mkdir -p, andcurl -owithout validation. A compromised repo could inject names like../../etcto write/delete files outside the target directory...sequences or absolute paths.Changes
install.shvalidate_safe_name()andvalidate_safe_path()functions, applied at 4 code pathsinstall.ps1Test-SafeNameandTest-SafePathfunctions, applied at skill listing and file installSECURITY.mdREADME.mdTest plan
./install.shlocally — verify normal skill installation still worksinstall.ps1on Windows — verify normal installation still works../test,foo bar) are rejected with error message