Back to skill

Security audit

BimDown 中文

Security checks for vulnerabilities and agentic risk

Overview

The skill is mostly coherent for BIM modeling, but it asks for an unpinned global npm install and gives a direct ZIP download-and-unzip command that should be reviewed before use.

Install only if you are comfortable approving a global npm package install from the npm registry. Prefer a pinned/local bimdown-cli install in a sandbox, review shared ZIP contents before extraction, and treat publish links as public because uploaded project names, geometry, rooms, materials, notes, CSV/SVG, GLB files, and metadata leave your machine.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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)

T08 · Insecure Dependencies

Warning
Location
SKILL.md:9
Finding
Unpinned Global npm Dependency May Execute Unreviewed Code<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:9-11` and `SKILL.md:31-38` **Vulnerability Type**: Unpinned third-party package installed globally with npm lifecycle-script execution **Risk Level**: Medium ### Vulnerable Code ```json "requires": { "bins": ["bimdown"], "install": { "npm": "bimdown-cli" } } ``` ```markdown 1. **First check**: Run `which bimdown` or `bimdown --version`. If it already exists, skip installation. 2. **If missing**: Install through npm—but **explicit user permission must be requested first** before independently running `npm install -g`. This writes to the global npm directory and executes arbitrary package scripts, making it a privileged operation. ```bash npm install -g bimdown-cli ``` ``` ### Technical Analysis The Skill directs the agent to install `bimdown-cli` without an exact version or cryptographic integrity constraint. As a result, npm resolves whichever package version the configured registry currently serves. The dependency can therefore change after the Skill has been reviewed. The global `-g` installation also writes outside the project workspace and may execute npm lifecycle scripts such as `preinstall`, `install`, and `postinstall` with the installing user's privileges. Although the Skill correctly requires explicit user permission and warns about package-script execution, consent does not prevent a compromised publisher account, registry compromise, malicious future release, or unexpected dependency change from introducing executable code. No evidence establishes that the current `bimdown-cli` package is malicious. The risk arises from the unpinned and globally executed supply-chain dependency. ### Attack Path 1. An attacker compromises the npm publisher account, the configured package registry, or a transitive dependency used by `bimdown-cli`. 2. The attacker publishes a malicious version under the expected package name. 3. A system without the `bimdown` executable loads the Skill. 4. T ...[truncated 933 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Pin `bimdown-cli` to an explicitly reviewed version rather than resolving the latest release: ```bash npm install --save-exact bimdown-cli@<reviewed-version> ``` 2. Prefer a project-local installation over `npm install -g`, and invoke it through a controlled local path or `npm exec` with an exact version. 3. Commit and enforce a lockfile containing resolved versions and integrity hashes. 4. Verify the expected npm registry, package publisher, package signature or provenance, and artifact checksum before installation. 5. Review both the direct package and its transitive dependencies whenever the pinned version is updated. 6. Disable lifecycle scripts with `--ignore-scripts` where the CLI does not require them. If scripts are required, inspect them before installation and execute the installation in a restricted environment. 7. Avoid elevated installation. Run dependency setup as an unprivileged account in a sandbox or container with minimal filesystem, credential, and network access. 8. Retain the existing explicit-consent requirement, but disclose the exact version, registry, script-execution behavior, and installation scope in the consent prompt. ]]>
Vulnerability Patterns
  • 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
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (2)

Natural-Language Policy Violations

Medium
Confidence
87% confidence
Finding
The skill's operative instructions begin in Chinese and continue throughout the document, effectively constraining the interaction and instruction set to a specific language. There is no explicit user opt-in or alternative language choice documented here, so this is a natural-language locale policy concern.

External Transmission

Medium
Category
Data Exfiltration
Content
9. **`bimdown resolve-topology <dir>`**: 为机电(MEP)管线自动检测共点端点,生成 `mep_nodes` 并填充连接字段。
10. **`bimdown merge <dirs...> -o <output>`**: 将多个项目目录合并为一个整合模型,自动解决 ID 冲突。
11. **`bimdown sync <dir>`**: 将数据水合到 DuckDB,然后再脱水写回 CSV/SVG,以此来应用默认计算值。
12. **下载他人共享的项目**: 若用户提供分享链接如 `https://bim-claw.com/s/<token>`,在末尾加上 `/download` 下载压缩包:`curl -L https://bim-claw.com/s/<token>/download -o project.zip && unzip project.zip -d project/`

## 发布与数据上传 (Publishing & Data Upload)
Confidence
90% confidence
Finding
The skill instructs the agent to fetch a remote ZIP via curl and immediately unzip it into a local directory. This creates a supply-chain ingestion risk: untrusted remote content can introduce malicious files, path traversal via archive entries, or unsafe project contents that later influence agent behavior or downstream tools.

Static analysis

No suspicious patterns detected.