GitHub Reader Skill 安全配置指南
v3.1 Security Hardened Version has fixed the following security issues:
v3.1 安全加固版已修复以下安全问题:
- ✅ Input Validation / 输入验证 - Prevents URL injection / 防止 URL 注入
- ✅ Safe URL Joining / 安全 URL 拼接 - Prevents SSRF attacks / 防止 SSRF 攻击
- ✅ Cache Data Validation / 缓存数据验证 - Prevents poisoning / 防止投毒
- ✅ Path Security Check / 路径安全检查 - Prevents traversal / 防止遍历
- ✅ Browser Concurrency Limit / 浏览器并发限制
- ✅ API Rate Limiting / API 频率限制
- ✅ Timeout Control / 超时控制
- ✅ Error Handling Optimization / 错误处理优化
- ✅ Logging / 日志记录
- ✅ Environment Variable Configuration / 环境变量配置
# Cache Configuration / 缓存配置
export GITVIEW_CACHE_DIR="/tmp/gitview_cache" # Cache directory / 缓存目录
export GITVIEW_CACHE_TTL="24" # Cache TTL (hours) / 缓存时间(小时)
export GITVIEW_CACHE_MAX_SIZE="1" # Max cache file (MB) / 最大缓存文件(MB)
# Performance Configuration / 性能配置
export GITVIEW_MAX_BROWSER="3" # Max concurrent browsers / 最大并发浏览器数
export GITVIEW_GITHUB_DELAY="2.0" # API call delay (seconds) / API 调用间隔(秒)
# Timeout Configuration / 超时配置
export GITVIEW_BROWSER_TIMEOUT="30" # Browser timeout (seconds) / 浏览器超时(秒)
export GITVIEW_GITHUB_TIMEOUT="10" # GitHub API timeout (seconds) / GitHub API 超时(秒)# 1. Normal request / 正常请求
/github-read microsoft/BitNet
# ✅ Should succeed / 应该成功
# 2. Path traversal attempt / 路径遍历尝试
/github-read ../etc/passwd
# ❌ Should be rejected / 应该拒绝
# 3. Special character attempt / 特殊字符尝试
/github-read user%20name/repo
# ❌ Should be rejected / 应该拒绝
# 4. Long name attempt / 超长名称尝试
/github-read a{150 characters}/repo
# ❌ Should be rejected (>100 characters) / 应该拒绝(>100 字符)
# 5. Concurrency stress test / 并发压力测试
# Send 10 requests simultaneously / 同时发送 10 个请求
# ✅ Should limit to max 3 concurrent / 应该限制为最多 3 个并发
# 6. Timeout test / 超时测试
# Simulate 60s network delay / 模拟网络延迟 60 秒
# ✅ Should timeout after 30s / 应该 30 秒后超时返回-
Stop Skill Immediately / 立即停止 Skill
openclaw gateway stop
-
Clear Cache / 清理缓存
rm -rf /tmp/gitview_cache
-
Check Logs / 检查日志
tail -n 100 ~/.openclaw/logs/gateway.log -
Update to Latest Version / 更新到最新版本
clawhub update github-reader
Before publishing, confirm / 发布前确认:
- All inputs are validated / 所有输入都经过验证
- URL joining uses safe functions / URL 拼接使用安全函数
- Cache data has size limits / 缓存数据有大小限制
- File paths are normalized / 文件路径经过规范化
- Concurrency and timeout control / 有并发和超时控制
- Errors don't leak sensitive information / 错误不会泄露敏感信息
- Logging security events / 日志记录安全事件
- Environment variables are configurable / 环境变量可配置
- ✅ Input validation tests (path traversal, special characters) / 输入验证测试(路径遍历、特殊字符)
- ✅ URL injection tests (SSRF protection) / URL 注入测试(SSRF 防护)
- ✅ Cache poisoning tests (data validation) / 缓存投毒测试(数据验证)
- ✅ Concurrency stress tests (100 requests) / 并发压力测试(100 次请求)
- ✅ Timeout control tests (network latency simulation) / 超时控制测试(网络延迟模拟)
Version / 版本: v3.1 (Security Hardened / 安全加固版)
Last Updated / 最后更新: 2026-03-13