hcs-obs-metaquery
华为云 OBS 元数据检索技能,代码与文档基本一致,存在轻微瑕疵(环境变量扫描范围宽于文档、依赖版本锁定宽松)。
Why this conclusion was reached
1/4 dimensions flagged1 undeclared or violating capabilities were inferred.
2 lower-risk artifacts were extracted and still need context.
There is no explicit malicious chain in the report.
1 dependency or supply-chain issues need attention.
What drove the risk score up
_load_credentials() 扫描所有 HUAWEI/HW/HWC 前缀变量(ACCESS_KEY/_AK/AK 等),而文档仅声明 HWCLOUD_AK/SK
requirements.txt 要求 requests>=2.20.0,该版本存在已知漏洞(2020年前),应至少锁定 2.31.0
SKILL.md 未提及 huaweicloudsdkcore 作为真实调用的依赖
Most important evidence
环境变量扫描范围超出文档声明
_load_credentials() 函数扫描所有 HUAWEI/HW/HWC 前缀的环境变量(匹配 ACCESS_KEY/_AK/AK/SECRET_KEY/_SK/SK 等模式),而 SKILL.md 仅声明需设置 HWCLOUD_AK/SK。攻击者若在同一环境注入如 HUAWEI_ACCESS_KEY=evil 的变量可能干扰工具行为,但尚未达到恶意凭证收割程度。
scripts/hcs-obs-metaquery.py:69 requests 依赖版本锁定过于宽松
requirements.txt 要求 requests>=2.20.0,但该版本存在已知安全漏洞(CVE-2023-32681 等)。实际环境中若未手动升级,可能安装到有漏洞版本。
requirements.txt:3 文档未完整声明真实调用依赖
SKILL.md 声明真实调用需 huaweicloudsdkobs + huaweicloudsdkcore,但未明确说明 huaweicloudsdkcore 的 signer 模块用于 API 签名。
SKILL.md:30 Declared capability vs actual capability
upload-object 命令读取本地文件写入 OBS,行为与声明一致 仅调用华为云 OBS SDK 和 Image Recognition/VIAS REST API,无外部数据外泄 scripts/hcs-obs-metaquery.py:69 扫描所有 HUAWEI/HW/HWC 前缀变量,范围超出文档声明的 HWCLOUD_AK/SK 代码无 subprocess/os.system 等 shell 执行调用 Suspicious artifacts and egress
https://support.huaweicloud.com/api-image/image_01_0007.html references/obs-metaquery-api.md:82
https://support.huaweicloud.com/api-vias/vias_01_0001.html references/obs-metaquery-api.md:95
Dependencies and supply chain
| Package | Version | Source | Known vuln | Notes |
|---|---|---|---|---|
| huaweicloudsdkobs | >=3.1.0 | pip | No | 版本锁定到 3.1.0+ |
| huaweicloudsdkcore | >=3.1.0 | pip | No | 版本锁定到 3.1.0+ |
| requests | >=2.20.0 | pip | Yes | 下界过低(2.20.0 为 2018 年版本,存在 CVE),建议升至 >=2.31.0 |
File composition
scripts/hcs-obs-metaquery.py SKILL.md references/obs-metaquery-api.md requirements.txt