Back to skill

Security audit

x-twitter-post-generator

Security checks for vulnerabilities and agentic risk

Overview

The skill appears to be a legitimate social post generator, but it asks users to run an unpinned external CLI with an API key and sends user content to a hosted service.

Install only if you are comfortable sending prompts, reference images, design settings, and the OneKey credential to the DeepNLP/OneKey service. Prefer the documented HTTPS API call over the unpinned `npx` example, or pin and review the CLI package before running it, and avoid using sensitive or private content unless the service terms meet your needs.

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:417
Finding

Unpinned npm Package Execution Through npx

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 417–422
Vulnerability Type: Unpinned third-party package execution
Risk Level: Medium

Vulnerable Code

bash
## 2. CLIs Usage

export DEEPNLP_ONEKEY_ROUTER_ACCESS=your_access_key
npx onekey agent craftsman-agent/craftsman-agent social_media_posts '{"prompt":"Movie Odyssey Main Characters Introduction,"images":[],"card_count":1,"template_id":"social-media-carousel", ... }'

The command invokes the onekey npm package without specifying an exact package version, lockfile, or integrity hash. Depending on the local npm configuration and cache, npx may retrieve and execute the currently resolved package release from the configured npm registry.

Technical Analysis

This creates a mutable software supply-chain boundary: the package code executed by users can differ from the code that existed when the skill was audited. The document also exports DEEPNLP_ONEKEY_ROUTER_ACCESS immediately before package execution, making that credential available in the child process environment.

No evidence establishes that the current onekey package is malicious. The risk arises because the documentation does not pin or verify the executable dependency. If the package, a transitive dependency, its publisher account, or the configured registry were compromised, arbitrary package lifecycle or CLI code could run with the invoking user's privileges.

Attack Path

  1. An attacker compromises the resolved onekey npm package, one of its dependencies, its publisher account, or a registry used by the victim.
  2. The attacker publishes a malicious package release that includes hostile lifecycle or CLI behavior.
  3. A user follows SKILL.md and exports a valid DEEPNLP_ONEKEY_ROUTER_ACCESS credential.
  4. The user runs the unversioned npx onekey ... command.
  5. npx resolves, downloads where necessary, and executes the attacker-controlled release.
  6. The mal ...[truncated 853 chars]
Remediation
View remediation

Remediation Suggestions

  1. Pin onekey to an exact reviewed version, for example npx --no-install onekey after a controlled local installation.
  2. Declare the package in a version-controlled package.json using an exact version rather than a range.
  3. Commit the corresponding lockfile and verify registry integrity metadata during installation.
  4. Install dependencies in a separate review step and run the CLI with npm exec --offline --no or an equivalent mode that prevents implicit package downloads.
  5. Document the official package scope, publisher, registry, and expected integrity digest to reduce dependency-confusion and spoofing risks.
  6. Run the CLI in a restricted environment with minimal filesystem and network permissions.
  7. Supply the API credential only to the intended process, avoid retaining it in a long-lived shell environment, and rotate it if package compromise is suspected.
  8. Review package lifecycle scripts and transitive dependencies before approving upgrades.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (4)

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The manifest describes a narrowly scoped X/Twitter post generator, while the documented behavior is a general multi-platform social media content generator. This scope mismatch is security-relevant because users may consent to one type of processing while the skill is actually capable of broader content generation and different external routing behavior.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill is marketed as an X/Twitter generator, but the embedded example payload mixes other channel profiles such as Instagram and Xiaohongshu. This mismatch can mislead users about what the skill actually sends and produces, increasing the chance of unintended posting formats, policy assumptions, or downstream automation errors.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The documentation instructs users to submit prompts and reference images to an external API endpoint but does not prominently warn that this data leaves the local environment. Users may unknowingly transmit sensitive text, copyrighted images, or personal data to a third-party service without informed consent.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
97% confidence
Finding

The skill explicitly posts user-supplied content and an API credential to a remote service at agent.deepnlp.org. External transmission is expected for a hosted generation service, but it remains a real security concern because any sensitive prompts, images, or metadata included in requests are disclosed outside the local trust boundary.

Content

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

bash
export DEEPNLP_ONEKEY_ROUTER_ACCESS=your_access_key

curl -X POST "https://agent.deepnlp.org/agent_router" \
-H "Content-Type: application/json" \
-H "X-OneKey: $DEEPNLP_ONEKEY_ROUTER_ACCESS" \
-d '{

Static analysis

No suspicious patterns detected.