Back to skill

Security audit

Tencent Cloud COS

Security checks for vulnerabilities and agentic risk

Overview

This skill needs review because its previews allow code injection and its saved cloud credentials receive weaker protection than promised.

Prefer a version that fixes preview escaping and credential storage before installing. For evaluation, use temporary credentials restricted to a test bucket, avoid saving keys, and disable HTML previews. Treat generated links and preview files as private access tokens. Require explicit approval for ACL changes, service shutdowns, and persistent indexing scope. KIKI=1 adds safeguards but does not fix the preview or encryption defects. Live cloud behavior and the host application's browser protections were not verified.

Vulnerability Patterns
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (1)

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/preview_gen.mjs
Finding

Replacement-string expansion bypasses JSON script escaping

Content
View full analysis

Impact

Attacker-controlled JavaScript can run within the preview document, alter its displayed results, and read preview contents, including embedded presigned URLs. Access to the parent application or network exfiltration depends on the hosting sandbox and CSP and is not established by this repository.

Vulnerability Patterns
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (87)

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

The description explicitly declares querying CI and subservice activation status, but does not disclose changing those configurations. The supplied commands perform administrative state changes rather than status queries or the advertised processing operations. Disabling services is a material additional capability, not merely a supporting implementation detail. These commands do not, by themselves, demonstrate deletion of COS buckets or stored objects.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
93% confidence
Finding

Status queries match the description, and enabling processing services could support the advertised processing features. However, unbinding CI, disabling services, and deleting processing queues are material administrative capabilities not disclosed by the declared purpose. Comments claim that some destructive commands are rejected in strict mode, but the supplied chunk does not show that enforcement. The underlying scripts are not supplied, so this assessment concerns the command capabilities exposed by this reference rather than verified API execution.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
88% confidence
Finding

Image recognition, OCR, and service-status queries match the description. However, the description only declares querying CI service activation status, not changing activation or creating and deleting service queues. These are additional administrative capabilities, including a destructive operation, rather than ordinary implementation details of recognition or status queries. The stated strict-mode restriction does not establish that the deletion capability is unavailable in other modes.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
88% confidence
Finding

图片处理命令与声明一致,片段未展示其余已声明功能本身不构成不匹配。但开通或关闭异步服务及创建或删除队列会改变云端服务配置,并非查询状态的实现细节,因此存在范围不匹配。该片段是命令示例而非实现代码,不能据此确认命令已经执行,也无法验证严格模式限制是否实际生效。

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
82% confidence
Finding

The supplied command appears to generate an HTML preview from a specification rather than perform a COS or CI operation. Although the description includes document preview, the command does not visibly reference an office document, cloud object, or CI preview service that would establish that connection. The script implementation is not supplied, so its internal behavior and any cloud integration cannot be verified.

Content

No source excerpt is available for this finding.

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 155)May include surrounding context.

md
- `scripts/cos_node.mjs`:COS 存储、写操作、处理作业和通用 CI 能力。

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 179)May include surrounding context.

md
除了入口拦截,`scripts/lib/ci_client.mjs` 的 `cosRequest` 与 `scripts/cos_node.mjs` 的 `cosRequestPromise` 会在请求层再次拒绝 DELETE 请求,双重兜底避免绕过。需要调整隐藏列表时,修改其中的 `STRICT_HIDDEN_ACT

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 244)May include surrounding context.

md
`cos_node.mjs` 启动时会自动读取 `.env`(环境变量优先于 `.env` 文件)。清理凭证:`rm -f .env`。

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 250)May include surrounding context.

md
存储和处理作业使用 `scripts/cos_node.mjs`;数据集只读检索优先使用 `scripts/ci_api.mjs`;检索结果预览使用 `scripts/preview_gen.mjs`。三个入口共享相同的运行模式与凭证策略。

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 378)May include surrounding context.

md
1. **拦截范围**:`cos_node.mjs` 的同步/异步处理、审核、语音、文件处理、MetaInsight 数据集写入与检索、`create-knowledge-base` 等计费类 action;`ci_api.mjs` 的检索与图片理解命令。只读状态查询(`describe-*` / `list-*` /

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 636)May include surrounding context.

md
数据集筛选、聚合、语义检索、图片理解和 EXIF 查询优先使用 `scripts/ci_api.mjs`。它与 `cos_node.mjs` 共用运行模式和凭证解析,不创建、修改或删除资源。

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 729)May include surrounding context.

md
检索前必须确认数据集模板。图片和元数据检索可使用 `cos_node.mjs` 的兼容 action;当前人脸粗搜优先使用 `ci_api.mjs`,字段与限制以 `references/dataset-search.md` 为准。

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 976)May include surrounding context.

md
- 如需还原明文:`node scripts/cos_node.mjs decrypt-env`

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 1039)May include surrounding context.

md
8. **脚本源码**见 `scripts/cos_node.mjs`

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 156)May include surrounding context.

md
- `scripts/ci_api.mjs`:数据集筛选、聚合和语义检索等只读能力。

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 176)May include surrounding context.

md
- **删除数据集、删除数据集绑定关系**等没有专用 action 的删除操作,同样禁止,不得通过 `ci-request`、`ci_api.mjs`、直接 HTTP/curl、内联脚本或任何其他入口绕行执行。

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 250)May include surrounding context.

md
存储和处理作业使用 `scripts/cos_node.mjs`;数据集只读检索优先使用 `scripts/ci_api.mjs`;检索结果预览使用 `scripts/preview_gen.mjs`。三个入口共享相同的运行模式与凭证策略。

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 378)May include surrounding context.

md
` 的同步/异步处理、审核、语音、文件处理、MetaInsight 数据集写入与检索、`create-knowledge-base` 等计费类 action;`ci_api.mjs` 的检索与图片理解命令。只读状态查询(`describe-*` / `list-*` / `ci-service-status`)、COS

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 636)May include surrounding context.

md
数据集筛选、聚合、语义检索、图片理解和 EXIF 查询优先使用 `scripts/ci_api.mjs`。它与 `cos_node.mjs` 共用运行模式和凭证解析,不创建、修改或删除资源。

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 729)May include surrounding context.

md
检索前必须确认数据集模板。图片和元数据检索可使用 `cos_node.mjs` 的兼容 action;当前人脸粗搜优先使用 `ci_api.mjs`,字段与限制以 `references/dataset-search.md` 为准。

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 932)May include surrounding context.

md
| | `face-search` | 兼容旧 FaceSearch 人脸搜索;当前粗搜优先使用 `ci_api.mjs` |

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 936)May include surrounding context.

md
| | `get-ai-media-info`(`ci_api.mjs`) | AI 媒资详情(`GetAIMediaInfo`):按 URI 拉取已入库图片或视频的 AI 标签、ASR、OCR、粗分类与整体描述;视频可按 `From`~`To`/`ClipId` 拼出片段描述(需 ImageSearch / Vide

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 157)May include surrounding context.

md
- `scripts/preview_gen.mjs`:检索结果的本地批量签名与 HTML 预览生成。

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 250)May include surrounding context.

md
存储和处理作业使用 `scripts/cos_node.mjs`;数据集只读检索优先使用 `scripts/ci_api.mjs`;检索结果预览使用 `scripts/preview_gen.mjs`。三个入口共享相同的运行模式与凭证策略。

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 179)May include surrounding context.

md
除了入口拦截,`scripts/lib/ci_client.mjs` 的 `cosRequest` 与 `scripts/cos_node.mjs` 的 `cosRequestPromise` 会在请求层再次拒绝 DELETE 请求,双重兜底避免绕过。需要调整隐藏列表时,修改其中的 `STRICT_HIDDEN_ACT