Skill Trust Decision

rewrite_question

技能功能与声明一致,但存在硬编码外部IP(47.77.199.56)和内嵌JWT凭证(作为默认fallback)等高危指标,构成凭证泄漏和潜在数据外送风险。

Install decision first Source: Manual upload Scanned: Apr 5, 2026
Files 3
Artifacts 2
Violations 2
Findings 4
Most direct threat evidence
01
攻击者获得源代码仓库读取权限或环境变量访问权 Entry · rewrite_question.py
02
从源码中提取硬编码JWT token和API_KEY Escalation · rewrite_question.py
03
使用提取的凭证向47.77.199.56的API进行认证,获取BI系统访问权限或窃取Milvus数据库中的QA对数据 Impact · rewrite_question.py

Why this conclusion was reached

3/4 dimensions flagged
Block
Declared vs actual capability

2 undeclared or violating capabilities were inferred.

Block
Hidden execution and egress

1 high-risk artifacts or egress signals were extracted.

Block
Attack chain and severe findings

The report includes 3 attack-chain steps and 2 severe findings.

Review
Dependencies and supply chain hygiene

3 dependency or supply-chain issues need attention.

Attack Chain

01
攻击者获得源代码仓库读取权限或环境变量访问权

Entry · rewrite_question.py:579

02
从源码中提取硬编码JWT token和API_KEY

Escalation · rewrite_question.py:579

03
使用提取的凭证向47.77.199.56的API进行认证,获取BI系统访问权限或窃取Milvus数据库中的QA对数据

Impact · rewrite_question.py:559

What drove the risk score up

硬编码外部IP为默认API端点 +15

47.77.199.56硬编码为GEMINI_API_URL默认值(out:network:WRITE),且HTTP无TLS保护

硬编码JWT凭证内嵌于源码 +15

rewrite_question.py:579-588 内嵌约500字符JWT作为默认token,暴露于源码中

凭证暴露于源码的供应链风险 +10

API_KEY和token无版本锁定,若代码库被攻击则凭证直接泄露

Most important evidence

High Credential Theft

硬编码JWT token暴露于源码

_get_gemini_config()函数中内嵌约500字符JWT Bearer token作为默认fallback值,当环境变量未配置时使用。此token对应企业内部BI系统身份认证,直接暴露于源码存在被提取利用风险。

rewrite_question.py:579
移除代码中的硬编码token,强制要求通过环境变量或.env文件注入。添加启动时校验逻辑,当检测到使用默认凭证时报错退出。
High Sensitive Access

硬编码外部IP地址作为默认API端点

GEMINI_API_URL的默认值为http://47.77.199.56/api/v1beta,指向外部IP地址而非本地服务。且使用HTTP(非HTTPS)传输,存在中间人攻击风险。此IP在SKILL.md中未声明。

rewrite_question.py:559
将默认值改为localhost或明确提示需要配置;强制使用HTTPS;调查47.77.199.56的IP归属,确认是否为授权的内部API网关。
Medium Supply Chain

第三方依赖无版本锁定

requirements.txt/pip依赖未指定版本范围(pymilvus、httpx、python-dotenv等),存在供应链攻击风险。

rewrite_question.py:1
为所有pip依赖添加版本锁定(如httpx>=0.27.0,<1.0),定期更新依赖审计漏洞。
Low Doc Mismatch

外部网络连接未在SKILL.md中声明

SKILL.md声明的能力仅限于'文本处理/LLM调用',但未说明默认连接到外部IP 47.77.199.56,也未说明Milvus数据库连接。实际网络行为超出文档声明范围。

SKILL.md:1
在SKILL.md中明确声明需要访问的外部服务地址和凭证来源。

Declared capability vs actual capability

Filesystem Pass
Declared READ
Inferred READ
rewrite_question.py:614 读取.env文件
Network Block
Declared NONE
Inferred WRITE
rewrite_question.py:559 硬编码外部IP作为默认API端点
Shell Pass
Declared NONE
Inferred NONE
index.js:55 使用spawn调用Python,无shell注入
Environment Block
Declared NONE
Inferred READ
rewrite_question.py:563-566 读取GEMINI_API_KEY/TOKEN等环境变量

Suspicious artifacts and egress

High IP Address
47.77.199.56

rewrite_question.py:559

Medium External URL
http://47.77.199.56/api/v1beta

rewrite_question.py:559

Dependencies and supply chain

PackageVersionSourceKnown vulnNotes
httpx * pip No 无版本锁定
pymilvus * pip No 无版本锁定;连接外部向量数据库
python-dotenv * pip No 无版本锁定

File composition

3 files · 943 lines
Python 1 files · 769 linesJavaScript 1 files · 128 linesMarkdown 1 files · 46 lines
Files of concern · 2
rewrite_question.py Python · 769 lines
硬编码JWT token暴露于源码 · 硬编码外部IP地址作为默认API端点 · 第三方依赖无版本锁定 · 47.77.199.56 · http://47.77.199.56/api/v1beta
SKILL.md Markdown · 46 lines
外部网络连接未在SKILL.md中声明
Other files · index.js

Security positives

功能逻辑清晰,与SKILL.md声明的用途一致(上下文重写)
无subprocess/shell管道执行,无命令注入风险
无eval()/exec()调用,代码无明显混淆
无遍历os.environ匹配敏感关键字的凭证收割行为
HTTP POST仅发往配置的API端点,无数据外泄到第三方