Skill Trust Decision

ct-advisor

ct-advisor技能将用户问题转发至外部Coze服务器进行AI精校,附带机器指纹标识;凭据采用XOR+base64混淆内嵌(已知非加密),存在凭证外泄与数据外传风险,但属合法临床试验咨询工具且有授权闸门保护。

Install decision first Source: ClawHub Scanned: 19 days ago
Files 78
Artifacts 50
Violations 1
Findings 6
Most direct threat evidence

Why this conclusion was reached

1/4 dimensions flagged
Block
Declared vs actual capability

1 undeclared or violating capabilities were inferred.

Review
Hidden execution and egress

50 lower-risk artifacts were extracted and still need context.

Pass
Attack chain and severe findings

There is no explicit malicious chain in the report.

Pass
Dependencies and supply chain hygiene

Dependencies are present but no obvious high-risk issue stands out.

What drove the risk score up

用户问题数据外传至Coze服务器 +20

original_question/draft_answer/query_meta随每次请求发送至ct-advisor.coze.site,数据面含临床问题内容

机器指纹标识(sha256@hostname)随请求发送 +8

compute_machine_id()生成的标识可跨请求关联同一设备,外部服务可建立设备画像

XOR+base64混淆凭据内嵌于源码 +8

adapters/coze_token_embedded.py和bug_report.py含内嵌凭据,文档明确说明非加密(仅防目录浏览);混淆密钥同源码发布

内嵌凭据若被逆向还原可劫持精校服务 +6

OBFUSCATION_KEY='ct-advisor-coze-obf-v1-3d9b'硬编码于源码,持源码者可还原token

Most important evidence

Medium Data Exfil

用户问题数据外传至外部Coze服务器

每次精校请求将original_question(用户原始问题)、draft_answer(本地草稿)、query_meta(含难度/类别/accuracy/query_origin机器指纹)发送至https://ct-advisor.coze.site/run。sanitize()模块尝试脱敏PII(身份证/手机/邮箱),但不处理临床问题内容本身——如用户输入受试者编号/药物名称/试验分期等敏感临床信息,理论上会被发送至外部服务器。

adapters/refiner.py:512
在SKILL.md明确告知用户哪些数据会外传;考虑在PII脱敏基础上增加临床敏感字段过滤(如受试者ID格式、试验编号格式等)
Medium Credential Theft

XOR+base64混淆凭据内嵌于源码

adapters/coze_token_embedded.py(L35-58)和adapters/bug_report.py(L69-84)内嵌EMBEDDED_SECRETS字典,包含XOR+base64混淆的Coze API token。文档明确说明'这是OBFUSCATION,NOT real encryption',混淆密钥OBFUSCATION_KEY='ct-advisor-coze-obf-v1-3d9b'硬编码于同一文件。任何持技能源码者均可还原token,劫持精校服务或冒充bugreport端点。

adapters/coze_token_embedded.py:31
文档已明确标注'公共凭据'、'用户授权发布',但混淆方式极弱。建议将内嵌凭据改为纯环境变量注入,完全移除源码中的token blob
Medium Sensitive Access

机器指纹标识跨请求关联

compute_machine_id()(refiner.py:118)生成sha256(hostname)作为query_origin,随每次请求发送至Coze服务端。虽然不含明文主机名/IP,但同一设备生成的稳定标识允许外部服务跨请求关联行为模式。文档在AGENTS.md§4.1承认此风险并披露。

adapters/refiner.py:118
文档已披露此权衡。若需完全消除设备关联,应改用每请求随机值(CHANGELOG 0.9.52曾改随机后回退)
Low Doc Mismatch

SKILL.md声明'shell:NONE'但实际使用subprocess执行兄弟技能

SKILL.md permissions声明filesystem:Read-only, network:controlled-coze-opt-in, 但未声明shell权限。代码中refine_answer.py:202和handle_need_tool.py:178通过subprocess.run()执行handle_need_tool.py和兄弟技能CLI,构成shell:WRITE能力但未在permissions中声明。

scripts/refine_answer.py:202
在SKILL.md permissions中补充shell:WRITE声明(用于执行兄弟技能CLI),或在allowed-tools映射中明确Read/Write/Bash的权限边界
Low Supply Chain

requests依赖无版本锁定

_ensure_requests()要求用户手动pip install requests==2.32.3,但未锁定版本号。若安装其他版本存在兼容/安全风险。

adapters/refiner.py:37
考虑在技能目录添加requirements.txt锁定requests==2.32.3
Info Obfuscation

base64/b64decode用于CLI payload传输(非恶意用法)

run_refined.py使用base64编码避免Windows heredoc中文JSON编码问题,refine_answer.py用sha256生成校验和——均为合法技术用途,不构成恶意混淆

scripts/run_refined.py:102
无需处置

Declared capability vs actual capability

Network Pass
Declared controlled-coze-opt-in
Inferred WRITE
config.json:auto_approve_endpoints含两个预置端点,SKILL.md声明controlled-coze-opt-in
Filesystem Pass
Declared Read-only
Inferred WRITE
coze_token_embedded.py:store_token()写入~/.workbuddy/skills/ct-advisor/config/coze.dat(可选覆盖),run_refined.py读取config.json
Shell Block
Declared NONE
Inferred WRITE
refine_answer.py:202调用subprocess.run执行handle_need_tool.py;handle_need_tool.py:178构造CLI命令执行兄弟技能
Environment Pass
Declared NONE
Inferred READ
coze_token_embedded.py:get_secret()读取CT_ADVISOR_COZE_TOKEN环境变量;compute_machine_id()读取socket.gethostname()
Skill Invoke Pass
Declared sibling-skills
Inferred WRITE
handle_need_tool.py通过subprocess执行ct-registry/ct-safety/ct-literature/ct-samplesize等兄弟技能

Suspicious artifacts and egress

Medium External URL
https://ct-bugreport.coze.site/run

AGENTS.md:62

Medium External URL
http://127.0.0.1:10808/

CHANGELOG.md:182

Medium External URL
https://ct-advisor.coze.site/run

CHANGELOG.md:264

Medium External URL
https://api.coze.cn/v1/chat

adapters/backend.py:77

Medium External URL
https://clawhub.ai/medstatstar/skills/ct-advisor/security-audit(当前发行版审计页)

docs/clawhub_audit_trace_20260815.md:4

Medium External URL
https://ct-advisor.coze.site/run**」(L15/L177),

docs/clawhub_audit_trace_20260815.md:39

Medium External URL
https://www.ich.org/

knowledge/ref-interaction-style.md:79

Medium External URL
https://www.ich.org/page/search-index-ich-guidelines

knowledge/ref-interaction-style.md:79

Medium External URL
https://www.nmpa.gov.cn/

knowledge/ref-interaction-style.md:79

Medium External URL
https://www.cde.org.cn/

knowledge/ref-interaction-style.md:79

Medium External URL
https://www.ich.org

knowledge/ref-reg-gcp-version.md:6

Medium External URL
https://www.nmpa.gov.cn

knowledge/ref-reg-gcp-version.md:7

Dependencies and supply chain

PackageVersionSourceKnown vulnNotes
requests 2.32.3 pip No 推荐版本已指定但未在requirements.txt中锁定

File composition

78 files · 18349 lines
Python 37 files · 8912 linesJSON 9 files · 5484 linesMarkdown 30 files · 3932 linesOther 1 files · 21 lines
Files of concern · 5
adapters/coze_token_embedded.py Python · 140 lines
XOR+base64混淆凭据内嵌于源码
config.json JSON · 32 lines
CHANGELOG.md Markdown · 366 lines
http://127.0.0.1:10808/ · https://ct-advisor.coze.site/run
adapters/refiner.py Python · 599 lines
用户问题数据外传至外部Coze服务器 · 机器指纹标识跨请求关联 · requests依赖无版本锁定
scripts/refine_answer.py Python · 588 lines
SKILL.md声明'shell:NONE'但实际使用subprocess执行兄弟技能
Other files · i18n_messages.json · ref-ops-gcp-site.md · ref-reg-submission.md · system_prompt.md · ref-ops-data.md · kw_localize.py +1

Security positives

PII脱敏机制完整(sanitize.py覆盖身份证/手机/邮箱/敏感关键字)
出站授权闸门实现良好(_check_outbound_authorization三阶段确认,非白名单首次出站需用户确认)
auto_approve_endpoints预置两个合法端点,授权流程透明
内嵌凭据明确标注为'公共凭据'、'用户授权发布'、'非加密混淆',无欺骗意图
AGENTS.md完整披露出站数据范围和机器指纹风险
代码决策架构清晰(route.py确定性难度分类,orchestrate.py代码编排),无LLM越权风险
所有subprocess调用路径可控(仅执行handle_need_tool.py和兄弟技能CLI,无动态命令注入)