Back to skill

Security audit

Tencent COS

Security checks for vulnerabilities and agentic risk

Overview

ClawScan marked this skill suspicious with high confidence because it found credential-handling weaknesses, vulnerable dependencies, and gaps in how some files could be inspected, though its stated cloud storage purpose was judged consistent with its capabilities.

Treat this as a review-worthy skill rather than a routine install. Before installing, consider whether you are comfortable with its credential storage approach, cloud processing and sharing workflows, preview-generation flaw, and reported dependency risks. The scan was partial, so it could not fully assess several scripts; the verdict does not establish malicious intent.

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-tag escaping

Content
View full analysis

Impact

An attacker can execute JavaScript within the preview document, alter displayed results, and read the generated document, including its embedded temporary signed object URLs. Outbound disclosure depends on the viewer's network policy. Access to the parent application or the cloud SecretKey is not established.

Vulnerability Patterns
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (93)

Known Vulnerable Dependency: fast-xml-parser==4.2.5 — 7 advisory(ies): CVE-2026-126066 (fast-xml-parser: Quadratic CPU consumption scanning unterminated stop-node tags); CVE-2026-33036 (fast-xml-parser affected by numeric entity expansion bypassing all entity expans); CVE-2026-27942 (fast-xml-parser has stack overflow in XMLBuilder with preserveOrder) +4 more

Critical
Category
Supply Chain
Confidence
94% confidence
Finding

The COS SDK explicitly depends on fast-xml-parser 4.2.5, matching the reported vulnerable dependency. XML parsing is relevant to COS/CI API traffic, and affected parsing or building configurations could permit resource exhaustion when processing malicious XML; the lockfile alone does not establish which advisory-specific paths are reachable or justify critical impact.

Content

No source excerpt is available for this finding.

Known Vulnerable Dependency: form-data==2.3.3 — 2 advisory(ies): CVE-2025-7783 (form-data uses unsafe random function in form-data for choosing boundary); CVE-2026-12143 (form-data: CRLF injection in form-data via unescaped multipart field names and f)

Critical
Category
Supply Chain
Confidence
93% confidence
Finding

request brings in form-data 2.3.3, matching the reported affected version. If the SDK uses multipart forms with attacker-controlled fields or filenames, boundary prediction or CRLF injection could alter submitted multipart content; ordinary object uploads do not by themselves establish that this path is used.

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 153)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 177)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 246)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 252)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 380)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 638)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 731)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 978)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 1041)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 154)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 174)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 252)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 380)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 638)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 731)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 934)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 938)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 155)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 252)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 177)May include surrounding context.

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

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

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

默认模式:凭证仅存于当前 session,关闭终端后需重新 export

{baseDir}/scripts/setup.sh --from-env

持久化模式:凭证写入项目本地 .env 文件,下次自动读取

{baseDir}/scripts/setup.sh --from-env --persist

text

Credential Access

High
Category
Privilege Escalation
Confidence
97% confidence
Finding

Although encrypting the integration's own credentials is legitimate, the source documents deriving the encryption key solely from hostname, username, and project path. These values are discoverable or guessable, so someone obtaining .env.enc can reconstruct the key without a secret; AES-256-GCM does not compensate for this predictable key derivation.

Content

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

md
| | `upload` → 指向知识库桶 | "上传到知识库" → 上传文档 |
| | `hybrid-search` → 指向知识库数据集 | "查询知识库" → 语义检索文档内容 |
| **🚫 禁止** | ~~deleteBucket~~ | **不允许删除/清空存储桶** |
| **🔐 凭证管理** | `encrypt-env` | 加密 .env → .env.enc 并删除明文 |
| | `decrypt-env` | 解密 .env.enc → .env 还原明文 |

## 安全注意事项

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

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

md
| | `hybrid-search` → 指向知识库数据集 | "查询知识库" → 语义检索文档内容 |
| **🚫 禁止** | ~~deleteBucket~~ | **不允许删除/清空存储桶** |
| **🔐 凭证管理** | `encrypt-env` | 加密 .env → .env.enc 并删除明文 |
| | `decrypt-env` | 解密 .env.enc → .env 还原明文 |

## 安全注意事项