V1.1.3: 修复跨源 CSRF 与任意路径写入漏洞#3
Open
jsun2020 wants to merge 1 commit into
Open
Conversation
- 新增 server/security.ts:提供 registerOriginGuard 与 confinePath/confineExistingPath 工具。 - CORS 锁定为本机绑定端口(loopback + localhost),不再反射任意 Origin。 - 所有变更型接口(POST/PUT/DELETE/PATCH)校验 Sec-Fetch-Site 或 Origin,阻断浏览器 drive-by 攻击。 - manage/versions/trash 中每个接收路径的接口,对用户提交路径先做 realpath 解析再做白名单校验;白名单包含 ~/.claude、~/.skill-hub、扫描到的项目根、SKILL_HUB_EXTRA_PATHS。 - skillName 拒绝分隔符、.. 与盘符,防止 path.join 逃逸。 - trash id 用正则校验形状,阻止 fs.rm 时的目录穿越。 - 重新构建 dist/ 与 release/claude-skill-hub.tgz。 Co-Authored-By: Claude Opus 4.6 (1M context) <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.
/.claude、/.skill-hub、扫描到的项目根、SKILL_HUB_EXTRA_PATHS。