安全扫描
OpenClaw
安全
medium confidenceThe skill's instructions and required tools are consistent with a CLI that creates temporary public URLs for local ports/files, but there are moderate implementation and provenance gaps you should be aware of (npm install, downloaded binaries, and unclear Cloudflare credential handling).
评估建议
This skill appears to do what it advertises (create temporary public URLs) but you should verify a few things before installing or running it: 1) Confirm the npm package (@ystemsrx/cfshare) and its source repository are legitimate and review its install scripts — npm -g can run arbitrary code. 2) Check the cloudflared binary source (the SKILL.md references official Cloudflare repos and GitHub releases; prefer package manager installs or signed releases). 3) Clarify whether you need a Cloudflare ...详细分析 ▾
✓ 用途与能力
Name/description (expose local ports/files via Cloudflare Quick Tunnel) align with the instructions: it calls cfshare and cloudflared, supports exposing ports/files, listing/stopping exposures, and exporting audit state. The declared required binaries in metadata (cfshare, cloudflared) match runtime checks.
ℹ 指令范围
SKILL.md stays within the stated purpose: it instructs running env_check, creating exposures, copying paths into a temporary workspace, and returning public_url/expires_at. It explicitly exposes user files/ports publicly (or with token/basic access) — this is expected but high-risk from a privacy perspective. It does not instruct reading unrelated system files or environment variables, though it references 'defaults' and 'runtime paths' which may cause the tool to read local config/policy files.
ℹ 安装机制
No install spec in the skill bundle (instruction-only). The SKILL.md recommends installing cfshare via npm -g and cloudflared via brew/apt/winget or a GitHub release binary. Those sources are common but carry moderate risk: npm packages run install scripts and can execute arbitrary code, and curl to download/extract binaries executes network-fetched code. Verify package provenance and signatures before installing.
ℹ 凭证需求
The skill declares no required environment variables or credentials, but it provides access modes (token/basic/none) and mentions masked access_info. It's unclear whether Cloudflare account credentials or cloudflared secrets (if any) are needed or how tokens are generated/managed. The lack of explicit mention of required Cloudflare credentials is an omission worth clarifying.
✓ 持久化与权限
always:false and no install artifacts in the skill bundle. The skill may advise running cfshare with --keep-alive for foreground lifecycle but does not request permanent agent presence or modification of other skills/config. No evidence of elevated or persistent privileges requested by the skill manifest itself.
安全有层次,运行前请审查代码。
运行时依赖
无特殊依赖
版本
latestv0.1.62026/2/12
- Removed the "allowed-tools" field from the skill manifest for improved compatibility. - No functional or CLI changes made in this release.
● 可疑
安装命令
点击复制官方npx clawhub@latest install cfshare
镜像加速npx clawhub@latest install cfshare --registry https://cn.longxiaskill.com
技能文档
# CFShare CLI Skill
cfshare wraps Cloudflare Quick Tunnel and outputs structured JSON.
Install 当...时 version checks 失败
If either command fails, install missing binaries before running anycfshare tool.
``bash
cfshare --version
cloudflared --version
`
如果cfshare --versionfails, installcfshare(requires 节点.js 和 npm):
bash
npm install -g @ystemsrx/cfshare
`
如果cloudflared --versionfails, installcloudflared由 platform:
macOS:
`bash
brew install cloudflare/cloudflare/cloudflared
`
Debian/Ubuntu:
`bash
curl -fsSL https://pkg.cloudflare.com/cloudflare-main.gpg | sudo tee /usr/share/keyrings/cloudflare-main.gpg >/dev/null
echo "deb [signed-by=/usr/share/keyrings/cloudflare-main.gpg] https://pkg.cloudflare.com/cloudflared $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/cloudflared.list
sudo apt-get update && sudo apt-get install -y cloudflared
`
Windows (PowerShell):
`powershell
winget install --id Cloudflare.cloudflared
`
WSL/Linux generic binary install:
`bash
curl -fsSL https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64 -o /usr/local/bin/cloudflared
sudo chmod +x /usr/local/bin/cloudflared
`
- Re-run both version checks. 如果 仍然 failing, 停止 和 举报 exact stderr 输出 到 用户.
CLI contract
`bash
cfshare [params-json] [options]
`
Supported tools:
env_checkexpose_portexpose_filesexposure_listexposure_getexposure_stopexposure_logsmaintenanceaudit_queryaudit_export
Global options:
--params ''或--params-file--配置 ''或--配置-file--workspace-dir(仅 used 由expose_files)--keep-alive(对于expose_, keep foreground process alive)--否-keep-alive(默认 对于expose_, 打印 结果 然后 exit)--compact
Command names accept _ and - (for example expose-port == expose_port).
Standard workflow 对于 agents
Runenv_check第一个.创建 exposure 带有expose_port或expose_files.Returnpublic_url和expires_at到 用户 immediately.由 默认,expose_prints 结果 和 exits.使用--keep-alive仅 当...时 foreground lifecycle control needed; 停止 带有Ctrl+C当...时 已完成.
Recommended for stable automation:
Prefer--params/--params-file在...上 positional raw JSON 到 归约 quoting errors.Preferaccess: "令牌"对于 sensitive content.Treataccess: "无"作为 publicly readable 由 anyone 带有 链接.
Tool usage
1) env_check
`bash
cfshare env_check
`
Returns:
cloudflared.ok/path/versiondefaults(effective policy + runtime paths)warnings
2) expose_port
`bash
cfshare expose_port --params '{"port":3000,"opts":{"access":"token","ttl_seconds":3600}}'
`
Params:
port:1..65535opts.ttl_secondsopts.access:令牌 | basic | 无opts.protect_origin: 默认access != "无"opts.allowlist_paths: path prefix allowlist 对于 reverse proxy
Returns:
idpublic_url(令牌 mode auto-appends?令牌=...)local_urlexpires_ataccess_info(secrets masked)
3) expose_files
`bash
cfshare expose_files --params '{"paths":["./dist"],"opts":{"mode":"normal","presentation":"preview","access":"none"}}'
`
Params:
paths: files/directories 到 复制 进入 temp workspaceopts.mode:normal | zip(默认normal)opts.presentation:下载 | 预览 | raw(默认下载)opts.ttl_secondsopts.access:令牌 | basic | 无opts.max_downloads: auto-停止 之后 threshold
File Serving Behavior:
Mode: normal
- Single file → served directly 在 root URL.
- Multiple files 或 directory → displayed 在...中 intuitive file explorer 接口.
Mode: zip
- 所有 files packaged 进入 ZIP 归档.
Presentation:
- 默认 behaviors: 下载 | 预览 | raw
- Behavior 可以 overridden 通过 查询 parameters.
- 下载 → forces browser file 保存.
- 预览 → renders inline (images, PDF, Markdown, audio/video, HTML, text, etc.).
- raw → serves original content 没有 任何 wrapper.
- 如果 file 类型 不 previewable, 预览 automatically falls back 到 raw, 然后 到 下载.
Returns:
id,public_url,expires_at,mode,presentationmanifest,manifest_mode,manifest_meta
4) exposure_list
`bash
cfshare exposure_list
`
Lists tracked sessions with id/type/status/public_url/local_url/expires_at.
5) exposure_get
`bash
cfshare exposure_get --params '{"id":"port_xxx","opts":{"probe_public":true}}'
cfshare exposure_get --params '{"filter":{"status":"running"},"fields":["id","status","public_url"]}'
`
Supports selector by id, ids, or filter.
Can probe public reachability via opts.probe_public.
6) exposure_stop
`bash
cfshare exposure_stop --params '{"id":"all"}'
`
Stops tunnel/proxy/origin and removes temporary workspace.
Returns {stopped, failed, cleaned}.
7) exposure_logs
`bash
cfshare exposure_logs --params '{"id":"files_xxx","opts":{"component":"all","lines":200}}'
`
component: tunnel | origin | all.
8) maintenance
`bash
cfshare maintenance --params '{"action":"run_gc"}'
cfshare maintenance --params '{"action":"set_policy","opts":{"policy":{"maxTtlSeconds":7200},"ignore_patterns":[".pem",".env*"]}}'
`
Actions:
start_guardrun_gcset_policy(requiresopts.policy或opts.ignore_patterns)
9) audit_query
`bash
cfshare audit_query --params '{"filters":{"event":"exposure_started","limit":100}}'
`
10) audit_export
`bash
cfshare audit_export --params '{"range":{"from_ts":"2026-01-01T00:00:00Z","output_path":"./audit.jsonl"}}'
`
Runtime files (CLI mode)
Default CLI state directory is ~/.cfshare:
policy.jsonpolicy.ignoreaudit.jsonlsessions.jsonworkspaces/exports/
Important limitations 在...中 CLI mode
expose_port和expose_filesexit 由 默认 之后 printing 结果; 使用--keep-alive到 hold foreground.Current 会话 registry 在...中-process memory; separatecfshareinvocations 做 不 恢复 满 live 会话 state.basicmode credentials masked 在...中 outputs, 所以令牌usually practical authenticated mode 对于 agent-delivered links.
Troubleshooting
cloudflared binary 不 found: installcloudflared或 设置--配置 '{"cloudflaredPath":"..."}'local 服务 不 reachable 在...上 127.0.0.1:: 开始 服务 第一个path blocked 由 ignore policy: adjustpolicy.ignore或maintenance set_policyport blocked 由 policy: 更新blockedPorts在...中 policy 如果 intentional
Use CFSHARE_LOG_LEVEL=info or CFSHARE_LOG_LEVEL=debug` for more stderr logs.