detecting-path-traversal
仓库创建 2026年6月24日最近提交 21 天前SkillHot 收录 21 天前
▸ 精选理由
定位易受攻击的路径拼接点,便于修复文件泄露风险。
这个 Skill 做什么
检测文件下载/查看接口中可能因不当路径拼接被../滥用的路径遍历漏洞。
在文件下载、附件查看或解压逻辑中找用户传入路径被拼接导致的 ../ 滥用风险,判断是否能读取任意文件或触发 ZipSlip。适用于有 ?file=、?filePath= 参数、@RequestParam 直接 new File()/Paths.get() 或服务器解压 ZIP 的场景,能定位能否访问 WEB-INF/web.xml、/etc/passwd 等敏感文件。支持现代 Spring 和老 JSP 两套栈,便于把问题定位到具体调用处。
▸ 展开 SKILL.md 英文原文
SQIsoft 웹 애플리케이션에서 경로 탐색(Path Traversal / Directory Traversal) 취약점을 검사한다. 파일 다운로드·뷰어·첨부파일 조회 기능에서 사용자 입력이 파일 경로에 그대로 삽입되어 ../를 이용한 임의 파일 접근(WEB-INF/web.xml, /etc/passwd 등) 또는 임의 파일 다운로드를 허용하는 패턴을 탐지한다. CWE-22, OWASP A01:2021 대응. spring-modern(@RequestParam 파일명 → Resource/Path 직접 반환, ZipSlip)과 jsp-legacy(download.do?filePath= 파라미터 경로 필터링 미흡) 두 스택을 지원한다.
0
Stars
0
Forks
16
仓库内 Skill
+0
7 日增星
安装 / 使用
给你的 Agent 一句话(通用)
帮我安装这个 skill:https://raw.githubusercontent.com/bs-koo/gx-security/main/skills/detecting-path-traversal/SKILL.md或 curl 直取 SKILL.md
curl -fsSL "https://raw.githubusercontent.com/bs-koo/gx-security/main/skills/detecting-path-traversal/SKILL.md"SKILL.MD 节选查看完整文件 ↗
# 경로 탐색(Path Traversal) 취약점 검사 (CWE-22 / Improper Limitation of a Pathname) ## When to Use 다음 중 하나라도 해당하면 이 스킬을 실행한다. - SQIsoft 프로젝트(예: `sqisoft-sef-2026`, `Gseed_Web_Renew`)에 **파일 다운로드·뷰어·첨부파일 조회** 기능이 있는 경우 - `@RequestParam`으로 받은 파일명/경로를 `new File()`, `Paths.get()`, `Resource` 등에 그대로 사용하는 코드가 보일 때 - 다운로드 URL이 `?file=`, `?filePath=`, `?fileName=` 같은 경로 파라미터를 노출할 때 - ZIP·tar 등 압축 파일을 서버에서 해제하는 코드가 있는 경우(ZipSlip) - 보안 코드 리뷰에서 `canonicalPath`, `normalize()`, `startsWith()` 같은 경로 검증이 없는 파일 I/O 코드가 보일 때 **이 스킬을 쓰지 않을 때:** 파일 경로를 사용자 입력으로 받지 않는 경우, 또는 파일 업로드 검증 이슈(→ `detecting-file-upload-vulnerabilities` 스킬 사용). ## Prerequisites - 대상 프로젝트 소스에 대한 읽기 접근 - (선택, 권장) `semgrep` 설치 — 없으면 `scripts
via SKILL·HOT · 数据来自 GitHub 公开信息 · 原文版权归作者所有