Back to skill

Security audit

OpenMAIC Convert Pptx

Security checks for vulnerabilities and agentic risk

Overview

The skill largely matches its stated PPT export purpose, but it needs review because it can execute code from a user-specified OpenMAIC path, mutate an external project dependency tree, and provides unsafe cleanup guidance.

Install only if you trust the OpenMAIC installation path and the dependencies already present there. Avoid using --openmaic-path with directories you did not create or verify, avoid running the test script's automatic npm install in a real OpenMAIC project, use --no-notes before sharing externally when notes may contain sensitive content, and do not run the wildcard cleanup command; delete only the exact generated PPTX file.

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

T09 · Insecure Skill Coding Practices

Error
Location
export_ppt.js:69
Finding
Caller-Controlled Path Permits Arbitrary JavaScript Module Execution## Vulnerability Details **File Location**: `export_ppt.js`, lines 69–74 and 109–113 **Vulnerability Type**: Untrusted executable module loading **Risk Level**: High **Vulnerable code:** ```javascript if (arg === '--openmaic-path') { if (i + 1 < args.length) { OPENMAIC_PATH = args[i + 1]; i++; // Skip the next argument } else { ``` ```javascript const pptxgenPath = path.join(OPENMAIC_PATH, 'packages/pptxgenjs/dist/pptxgen.cjs.js'); let pptxgen; try { pptxgen = require(pptxgenPath); } catch (error) { ``` ### Technical Analysis The `--openmaic-path` command-line argument controls the root directory from which the script loads `pptxgen.cjs.js`. The supplied path is not restricted to a trusted installation, canonicalized and validated against an allowlist, checked for unsafe symbolic links, or verified using a cryptographic digest. A CommonJS `require()` call immediately executes the selected module's top-level JavaScript. Consequently, `--openmaic-path` is not merely a data-path parameter: it controls an executable-code source. An attacker who can influence the argument or the contents of the selected directory can execute arbitrary JavaScript with the privileges of the user or Agent running this Skill. This issue does not establish that the project itself contains malicious code. It creates a code-execution boundary through which an untrusted or compromised OpenMAIC installation can supply malicious code. ### Attack Path 1. An attacker creates or compromises a directory that appears to be an OpenMAIC installation. 2. The attacker places malicious JavaScript at `packages/pptxgenjs/dist/pptxgen.cjs.js` under that directory. 3. The attacker persuades the user or Agent to invoke the exporter with `--openmaic-path <attacker-controlled-directory>`. 4. The script constructs `pptxgenPath` beneath the supplied directory. 5. `require(pptxgenPath)` executes the attacker's module befor ...[truncated 724 chars]
Remediation
## Remediation Suggestions - Declare `pptxgenjs` as a pinned dependency of this project and load it by package name from the project's own controlled dependency directory. - Commit and enforce a lockfile containing registry integrity hashes. - Do not load executable dependencies from a directory selected through a general command-line argument. - If loading from OpenMAIC is unavoidable, resolve both the installation root and module path with `fs.realpathSync()` and require them to remain under a trusted, explicitly configured canonical root. - Reject symbolic links, unexpected file ownership, and writable-by-untrusted-user module files where the deployment platform supports such checks. - Verify the module against a pinned cryptographic digest or signed manifest before calling `require()`. - Run conversion in a restricted process with minimal filesystem access, no unnecessary credentials, and no network access.

other

Warning
Location
SKILL.md:41
Finding
Workspace-Wide Cleanup Command Can Delete Unrelated Presentations## Vulnerability Details **File Location**: `SKILL.md`, line 41 **Vulnerability Type**: Overbroad destructive file deletion **Risk Level**: Medium **Vulnerable instruction:** ```bash # 4. Clean test files (optional) rm -f ~/.openclaw/workspace/*.pptx ``` ### Technical Analysis The cleanup command uses a wildcard over a shared workspace rather than identifying the exact file generated by this Skill. Shell expansion causes `*.pptx` to select every matching presentation in `~/.openclaw/workspace`. Although this appears in Skill documentation rather than the JavaScript implementation, Skill instructions are operational guidance that an AI Agent may execute. The same document describes cleanup as part of the workflow. The command therefore creates a destructive behavior risk when followed literally. The `-f` option suppresses prompts and errors, removing an opportunity for the user to notice that unrelated files were selected. No ownership marker, generated-file manifest, dedicated temporary directory, or canonical-path validation is used. ### Attack Path 1. The shared workspace contains one or more unrelated user PPTX files. 2. The Agent exports a presentation using this Skill. 3. The Agent follows the documented optional cleanup command. 4. The shell expands `~/.openclaw/workspace/*.pptx` to all matching presentations. 5. `rm -f` deletes both the generated file and unrelated user files without confirmation. ### Impact Assessment Exploitation or accidental execution can permanently delete every PPTX file in the user's OpenClaw workspace that the Agent account is authorized to remove. The issue does not grant additional privileges, but it abuses existing write permissions and may cause loss of unrelated user work. The scope is confined to matching PPTX files in the specified workspace. Files may be recoverable only if separate backups, snapshots, or operating-system recovery facilities are available.
Remediation
## Remediation Suggestions - Remove the workspace-wide wildcard deletion instruction. - Retain and delete only the exact `outputPath` returned by `exportCoursePPT()`. - Require explicit user confirmation before deleting a delivered output. - Store generated files in a dedicated, per-run temporary directory with restrictive permissions. - Before deletion, canonicalize the target and verify that it is inside the dedicated output directory. - Maintain a per-run manifest of generated files rather than discovering files through wildcard matching. - Prefer moving deleted outputs to a recoverable trash location when the platform supports it.

T08 · Insecure Dependencies

Warning
Location
test_export.sh:44
Finding
Test Script Installs an Unpinned Dependency into an External Project## Vulnerability Details **File Location**: `test_export.sh`, lines 44–53 **Vulnerability Type**: Unsafe and unpinned runtime dependency installation **Risk Level**: Medium **Vulnerable code:** ```bash # Check pptxgenjs cd "$OPENMAIC_PATH" if ! npm list pptxgenjs &> /dev/null; then echo "⚠️ pptxgenjs is not installed; installing..." npm install pptxgenjs if [ $? -ne 0 ]; then echo "❌ Failed to install pptxgenjs" exit 1 fi echo "✅ pptxgenjs installed" else ``` ### Technical Analysis The test script automatically runs `npm install pptxgenjs` when the package is absent. No exact version is specified, and the audited project contains no demonstrated lockfile or integrity policy. Package resolution can therefore change over time according to mutable registry metadata and dependency ranges. The installation is performed after changing into the external OpenMAIC directory. This mutates another project rather than installing dependencies in an isolated environment owned by the audited Skill. By default, npm installation may also execute package lifecycle scripts from the resolved dependency graph. The documentation repeats unpinned installation guidance in `README.md` lines 16–25 and `USAGE_EXAMPLE.md` lines 153–159. The confirmed executable instance is in `test_export.sh`. This finding does not prove that `pptxgenjs` is malicious. The risk arises from automatically retrieving and installing an unpinned, mutable dependency and its transitive dependency graph during a test. ### Attack Path 1. A user or Agent runs `test_export.sh` in an environment where `pptxgenjs` is not installed in OpenMAIC. 2. The script changes its working directory to the external OpenMAIC installation. 3. It invokes `npm install pptxgenjs` without an exact reviewed version or an enforced lockfile. 4. npm resolves the current package and transitive dependency versions from its configured reg ...[truncated 899 chars]
Remediation
## Remediation Suggestions - Declare an exact reviewed `pptxgenjs` version in this project's dependency manifest. - Commit a lockfile and use `npm ci` so package versions and integrity hashes are reproducible. - Do not automatically install dependencies into the external OpenMAIC project during tests. - Install dependencies in an isolated project directory or prebuilt test environment. - Use `--ignore-scripts` where package lifecycle scripts are not required, and explicitly review any scripts that must be enabled. - Configure npm to use an approved registry and apply dependency provenance, signature, and vulnerability checks where available. - Make dependency absence a clear test failure with manual setup instructions rather than silently mutating another installation. - Update `README.md` and `USAGE_EXAMPLE.md` to reference the pinned, lockfile-based installation process.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (9)

Tool Parameter Abuse

High
Category
Tool Misuse
Content
ls ~/.openclaw/workspace/*.pptx

# 4. 清理测试文件(可选)
rm -f ~/.openclaw/workspace/*.pptx
```

**注意**:脚本会自动查找OpenMAIC安装位置,无需手动指定路径。如果OpenMAIC安装在非标准位置,可以使用`--openmaic-path`参数手动指定。
Confidence
90% confidence
Finding
The documented cleanup command `rm -f ~/.openclaw/workspace/*.pptx` is overly broad and can delete unrelated PPT files in the entire workspace, not just files produced by this skill. In a shared or reused workspace, this can cause unintended data loss if an agent follows the instruction automatically or a user copies it without understanding the scope.

Missing User Warnings

Medium
Confidence
92% confidence
Finding
The README states that speaker notes are included by default, but it does not clearly warn that exported PPT files may contain sensitive internal narration, prompts, or other non-public content embedded in course notes. In a skill that produces shareable artifacts for end users, this increases the risk of accidental data disclosure because users or operators may distribute the generated PPT without realizing hidden notes are present.

Missing User Warnings

Medium
Confidence
93% confidence
Finding
The skill documents that exported PPTs include speaker notes by default and are stored in `~/.openclaw/workspace/`, but it does not present this as a prominent user warning before export. That creates a real privacy and data-handling risk: users may unintentionally export sensitive notes and leave copies in a shared or persistent workspace location before transmission.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The skill defaults to exporting speaker notes, which can expose internal scripts, sensitive prompts, unpublished content, or personal data embedded in course notes without the user explicitly realizing it. In this context, the example repeatedly presents notes inclusion as the default behavior and does not warn about privacy implications, making accidental data disclosure plausible.

Missing User Warnings

Medium
Confidence
89% confidence
Finding
The cleanup step uses a wildcard deletion command to remove matching PPT files, which can delete user data beyond the just-generated export if filenames overlap the pattern. Because the documentation provides this as a normal post-send step without safeguards, users or implementations may adopt unsafe deletion behavior and cause unintended data loss.

Missing User Warnings

Medium
Confidence
91% confidence
Finding
The script exports scene speech text directly into PPT speaker notes by default, and those notes may contain sensitive internal guidance, unpublished narration, or confidential training content. Because this happens automatically without a strong upfront warning or opt-in, users may unintentionally distribute a PPTX containing hidden notes that recipients can later extract.

Intent-Code Divergence

Medium
Confidence
98% confidence
Finding
The comment says the PPT should be saved to a user-specified working directory when available, otherwise to the workspace directory. However, the implementation unconditionally constructs the output path from process.env.HOME and '.openclaw/workspace', with no logic for any user-specified output directory.

Natural-Language Policy Violations

Medium
Confidence
95% confidence
Finding
This shell script presents its comments and user-visible echo messages exclusively in Chinese, which effectively forces a specific language/locale for users running the skill. The policy allows locale constraints only when documented and justified or when users are given a choice, neither of which is present here.

Natural-Language Policy Violations

Low
Confidence
78% confidence
Finding
整个README及面向用户的交互描述均默认使用中文,例如要求导出时的说明、输出示例和操作步骤都未提供其他语言选项。根据该规则,若技能强制特定语言而没有用户选择或合理的区域性约束说明,可构成自然语言政策问题。

Static analysis

No suspicious patterns detected.