Back to skill

Security audit

xiaohongshu-post-generator

Security checks for vulnerabilities and agentic risk

Overview

The skill is mostly a disclosed social-post generator, but it asks users to run an unpinned npm CLI with an API key and upload content to external services without enough safety scoping.

Review this skill before installing. Use a least-privilege DeepNLP/OneKey key, avoid submitting confidential prompts or proprietary images unless you trust the service's data handling, and avoid the unpinned `npx onekey` path unless you pin or otherwise verify the CLI package and run it in a restricted environment.

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

Error
Location
SKILL.md:421
Finding

Unpinned npm Package Is Downloaded and Executed Through npx

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 421-422
Vulnerability Type: Unpinned third-party package execution
Risk Level: High

Vulnerable Code

bash
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":"knowledge-card","api_id":"image_generator","asset_size":[{"width":1080,"height":1080,"ratio":"1:1"}],"mode":"basic","session_id":"31d57eb9-9a37-4808-9c5b-1bfbb2abf5fb","session_name":"AI Poster of MCPs/CLIs/Agents","tag_list":"","model":"default","styles":["Editorial grid layout with corporate dark deep monochromatic tones"],"design_config":{"template_id":"knowledge-card","card_count":1,"card_count_source":"default","channel_profile":"generic","audience_profile":"general","age_band":"auto","profile_version":"1.0.0","geometry_source":"profile","resolved_profiles":[{"type":"channel","id":"generic","version":"1.0.0"},{"type":"audience","id":"general","version":"1.0.0"}],"language":"auto","mode":"standard","text_model":"default","image_model":"default","styles":["Editorial grid layout with corporate dark deep monochromatic tones"],"constraints":["Limit target output build to 6 high-density pages max for physical double folding print"],"brief_inputs":[{"id":"binp-1","type":"prompt","content":"Introduction to Difference between MCPs,Skills and Agents CLIs"},{"id":"binp-2","type":"style","content":"Editorial grid layout with corporate dark deep monochromatic tones"},{"id":"binp-3","type":"constraint","content":"Limit target output build to 6 high-density pages max for physical double folding print"},{"id":"binp-1786857754660","type":"prompt","content":"Custom newly configured prompt parameter specifications instructions layout metric..."}],"text_styles":{"brand":{"color":"#8b5cf6","font":"Playfair Display","font_size":"20px","font_weight":"600","text_align":"lef
...[truncated 3991 chars]
Remediation
View remediation

Remediation Suggestions

  1. Pin onekey to an exact, reviewed version rather than relying on the registry's current package:
    bash
    npx --yes onekey@<reviewed-exact-version> ...
    
  2. Prefer installing the dependency from a committed lockfile with npm ci, then invoke the locally installed binary:
    bash
    npm ci --ignore-scripts
    ./node_modules/.bin/onekey ...
    
    Enable lifecycle scripts only if they have been reviewed and are required.
  3. Commit the relevant package.json and lockfile and verify package integrity in CI.
  4. Document the package's official npm namespace, publisher, source repository, and expected integrity information to reduce package-confusion and spoofing risk.
  5. Run the CLI in a restricted container or sandbox with only the files and network destinations required for generation.
  6. Supply the access key only to the narrowly scoped command, use a least-privilege key, and rotate it if package compromise is suspected:
    bash
    DEEPNLP_ONEKEY_ROUTER_ACCESS="$DEEPNLP_ONEKEY_ROUTER_ACCESS" \
      ./node_modules/.bin/onekey ...
    
  7. Avoid running the command as an administrator or in a CI environment containing unrelated production credentials.
  8. Add dependency monitoring and require review before updating the pinned package or its transitive dependencies.
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (21)

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The manifest describes a Xiaohongshu post generator focused on generating editable Xiaohongshu-ready posts and slides. However, the documented behavior explicitly says it generates Instagram-ready posts, supports X-Twitter asset sizing, and that final posts can be published to X-Twitter instantly, which is materially broader than the declared skill purpose.

Content

No source excerpt is available for this finding.

Whitespace Padding

Medium
Category
Prompt Injection
Confidence
70% confidence
Finding

Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.

Content

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

md
This is a demo to generate an 2 pages Instagram Ready Social Media Posts using just simple text and reference images prompts. The AI X-Twitter posts asset size ratio/width/height can be customized.
The final generated assets (contents, images, captains, backgrounds) are editable, and the generated final posts can be exported and published to X-Twitter instantly.

| Item                | Value                                                                                                                                                                       |
|---------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| prompt              | Write a simple character introduction for the movie Odyssey                                                                                                                 |
| Task                | Task:  Briefly describe the main characters, their roles, personalities, and relationships.  Choose Instagram as distribution channel, output imags using 4:5 images ratios |

Whitespace Padding

Medium
Category
Prompt Injection
Confidence
70% confidence
Finding

Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.

Content

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

md
| Item                | Value                                                                                                                                                                       |
|---------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| prompt              | Write a simple character introduction for the movie Odyssey                                                                                                                 |
| Task                | Task:  Briefly describe the main characters, their roles, personalities, and relationships.  Choose Instagram as distribution channel, output imags using 4:5 images ratios |
| Final Workspace URL | https://craftsman-agent.aiagenta2z.com/app/sessions/share/4d7342da-ea5b-45c0-8e53-f0a1ae6d0183                                                                              |

Whitespace Padding

Medium
Category
Prompt Injection
Confidence
70% confidence
Finding

Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.

Content

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

md
| Item                | Value                                                                                                                                                                       |
|---------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| prompt              | Write a simple character introduction for the movie Odyssey                                                                                                                 |
| Task                | Task:  Briefly describe the main characters, their roles, personalities, and relationships.  Choose Instagram as distribution channel, output imags using 4:5 images ratios |
| Final Workspace URL | https://craftsman-agent.aiagenta2z.com/app/sessions/share/4d7342da-ea5b-45c0-8e53-f0a1ae6d0183                                                                              |

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill instructs users to send prompts, uploaded images, and an access key to an external service, but provides no explicit privacy, retention, or third-party data-sharing warning. In a content-generation skill, users may include sensitive text or proprietary images, so silent transmission to a remote endpoint increases confidentiality and compliance risk.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
94% confidence
Finding

The documented workflow explicitly transmits user-controlled content and a bearer-style access key to a remote endpoint. While external API use is expected for this kind of skill, it is still a real security-relevant behavior because it creates a clear data egress path and potential credential exposure surface if users do not understand what is being sent.

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 '{

Whitespace Padding

Medium
Category
Prompt Injection
Confidence
70% confidence
Finding

Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.

Content

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

md
### Request Parameters

| Field         | Required | Description                                                                                                                             |
|---------------|----------|-----------------------------------------------------------------------------------------------------------------------------------------|
| prompt        | Required | Text, User Input Design Goal, e.g. `Genreate a movie character description of Movie Odyssey`                                            |
| images        | Required | List of Reference Images that user uploads                                                                                              |

Whitespace Padding

Medium
Category
Prompt Injection
Confidence
70% confidence
Finding

Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.

Content

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

md
| Field         | Required | Description                                                                                                                             |
|---------------|----------|-----------------------------------------------------------------------------------------------------------------------------------------|
| prompt        | Required | Text, User Input Design Goal, e.g. `Genreate a movie character description of Movie Odyssey`                                            |
| images        | Required | List of Reference Images that user uploads                                                                                              |
| onekey        | Required | DeepNLP Router OneKey Program                                                                                                           |
| api_id        | Required | use `social_media_posts` to represent Social Media Posts Generator                                                                      | 
| template_id   | Required | use `knowledge-card` as default                                                                                                         |

Whitespace Padding

Medium
Category
Prompt Injection
Confidence
70% confidence
Finding

Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.

Content

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

md
|---------------|----------|-----------------------------------------------------------------------------------------------------------------------------------------|
| prompt        | Required | Text, User Input Design Goal, e.g. `Genreate a movie character description of Movie Odyssey`                                            |
| images        | Required | List of Reference Images that user uploads                                                                                              |
| onekey        | Required | DeepNLP Router OneKey Program                                                                                                           |
| api_id        | Required | use `social_media_posts` to represent Social Media Posts Generator                                                                      | 
| template_id   | Required | use `knowledge-card` as default                                                                                                         |
| channel_profile | Required | The distribution channel of Social Media Cards. Supported Values include:  `general`, `xiaohongshu`,`x-twitter`,`instagram`             |

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The request parameter table states that api_id should be social_media_posts to represent the Social Media Posts Generator. But the CLI example passes "api_id":"image_generator", which contradicts the documented intent and suggests a different backend capability than the skill claims to wrap.

Content

No source excerpt is available for this finding.

Whitespace Padding

Medium
Category
Prompt Injection
Confidence
70% confidence
Finding

Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.

Content

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

md
| images        | Required | List of Reference Images that user uploads                                                                                              |
| onekey        | Required | DeepNLP Router OneKey Program                                                                                                           |
| api_id        | Required | use `social_media_posts` to represent Social Media Posts Generator                                                                      | 
| template_id   | Required | use `knowledge-card` as default                                                                                                         |
| channel_profile | Required | The distribution channel of Social Media Cards. Supported Values include:  `general`, `xiaohongshu`,`x-twitter`,`instagram`             |
| audience_profile | Required | The Audience of Social Media Cards. Supported Values include:  `general`, `curiosity`                                                   |
| card_count    | Required | int, e.g. 4 cards of instagram/twitter/xiaohongshu                                                                                      |

Whitespace Padding

Medium
Category
Prompt Injection
Confidence
70% confidence
Finding

Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.

Content

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

md
| template_id   | Required | use `knowledge-card` as default                                                                                                         |
| channel_profile | Required | The distribution channel of Social Media Cards. Supported Values include:  `general`, `xiaohongshu`,`x-twitter`,`instagram`             |
| audience_profile | Required | The Audience of Social Media Cards. Supported Values include:  `general`, `curiosity`                                                   |
| card_count    | Required | int, e.g. 4 cards of instagram/twitter/xiaohongshu                                                                                      | 
| asset_size    | Required | List of Asset Size Available, default to templates, such as List of width,height,ratio, {"width": 1080, "height": 1080, "ratio": "1:1"} |
| mode          | Optional | The design complexity, basic,standard,advanced                                                                                          |
| styles        | Optional | List, List of Styles Prompt, e.g. deep monochromatic tones,techonology styles                                                           |

Whitespace Padding

Medium
Category
Prompt Injection
Confidence
70% confidence
Finding

Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.

Content

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

md
| audience_profile | Required | The Audience of Social Media Cards. Supported Values include:  `general`, `curiosity`                                                   |
| card_count    | Required | int, e.g. 4 cards of instagram/twitter/xiaohongshu                                                                                      | 
| asset_size    | Required | List of Asset Size Available, default to templates, such as List of width,height,ratio, {"width": 1080, "height": 1080, "ratio": "1:1"} |
| mode          | Optional | The design complexity, basic,standard,advanced                                                                                          |
| styles        | Optional | List, List of Styles Prompt, e.g. deep monochromatic tones,techonology styles                                                           |
| design_config | Optional | Dict, Detailed Layers of Text, Prompt, Images on the Slides                                                                             |

Whitespace Padding

Medium
Category
Prompt Injection
Confidence
70% confidence
Finding

Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.

Content

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

md
### Results Parameters

| Field      | Description                                                                                                                        |
|------------|------------------------------------------------------------------------------------------------------------------------------------|
| session_id | The unique id of AI Generated Images/Slides/Carousels                                                                              |
| title      | The title of the genreate Slides                                                                                                   |

Whitespace Padding

Medium
Category
Prompt Injection
Confidence
70% confidence
Finding

Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.

Content

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

md
| Field      | Description                                                                                                                        |
|------------|------------------------------------------------------------------------------------------------------------------------------------|
| session_id | The unique id of AI Generated Images/Slides/Carousels                                                                              |
| title      | The title of the genreate Slides                                                                                                   |
| share_url | The workspace of this generate slides, you can open workspace an edit the generated text,color,size and export the final images... |
| card_count                              | The Int value of Card Counts of Generated 4 Pages of Instagram/Twitter/Xiaohongshu Slides                                          |
| images                                  | List of url, The List of Main Generated Images from AI Image Generator, Each Card Have one image                                   |

Whitespace Padding

Medium
Category
Prompt Injection
Confidence
70% confidence
Finding

Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.

Content

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

md
| Field      | Description                                                                                                                        |
|------------|------------------------------------------------------------------------------------------------------------------------------------|
| session_id | The unique id of AI Generated Images/Slides/Carousels                                                                              |
| title      | The title of the genreate Slides                                                                                                   |
| share_url | The workspace of this generate slides, you can open workspace an edit the generated text,color,size and export the final images... |
| card_count                              | The Int value of Card Counts of Generated 4 Pages of Instagram/Twitter/Xiaohongshu Slides                                          |
| images                                  | List of url, The List of Main Generated Images from AI Image Generator, Each Card Have one image                                   |

Whitespace Padding

Medium
Category
Prompt Injection
Confidence
70% confidence
Finding

Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.

Content

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

md
| data                                    | The text/references images displayed as layers on the main images.                                                                 |
| data.sequence_pages                     | List of Design Generated Layers config: The text,headline,content                                                                  |
| data.sequence_pages[i]                  | Dict of Pages Data                                                                                                                 |
| data.sequence_pages[i].id               | The ID of the generated Pages                                                                                                      |
| data.sequence_pages[i].label              | The Label of the generated Pages                                                                                                   |
| data.sequence_pages[i].geometry           | The geometry of the generated Page, following the formats of "widthxheight"                                                        |
| data.sequence_pages[i].canvas_width       | The width of the generated Page, e.g. 1080                                                                                         |

Whitespace Padding

Medium
Category
Prompt Injection
Confidence
70% confidence
Finding

Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.

Content

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

md
| data.sequence_pages[i].id               | The ID of the generated Pages                                                                                                      |
| data.sequence_pages[i].label              | The Label of the generated Pages                                                                                                   |
| data.sequence_pages[i].geometry           | The geometry of the generated Page, following the formats of "widthxheight"                                                        |
| data.sequence_pages[i].canvas_width       | The width of the generated Page, e.g. 1080                                                                                         |
| data.sequence_pages[i].canvas_height      | The height of the generated Page, e.g. 1350                                                                                        |
| data.sequence_pages[i].layers             | Layers config: List of Layers Data, text,headline,content displayed                                                                |
| data.sequence_pages[i].layers[j].id       | Int, Card ID                                                                                                                       |

Whitespace Padding

Medium
Category
Prompt Injection
Confidence
70% confidence
Finding

Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.

Content

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

md
| data.sequence_pages[i].label              | The Label of the generated Pages                                                                                                   |
| data.sequence_pages[i].geometry           | The geometry of the generated Page, following the formats of "widthxheight"                                                        |
| data.sequence_pages[i].canvas_width       | The width of the generated Page, e.g. 1080                                                                                         |
| data.sequence_pages[i].canvas_height      | The height of the generated Page, e.g. 1350                                                                                        |
| data.sequence_pages[i].layers             | Layers config: List of Layers Data, text,headline,content displayed                                                                |
| data.sequence_pages[i].layers[j].id       | Int, Card ID                                                                                                                       |
| data.sequence_pages[i].layers[j].type     | String, Supported Type: background,text,image,headline                                                                             |

Whitespace Padding

Medium
Category
Prompt Injection
Confidence
70% confidence
Finding

Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.

Content

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

md
| data.sequence_pages[i].canvas_width       | The width of the generated Page, e.g. 1080                                                                                         |
| data.sequence_pages[i].canvas_height      | The height of the generated Page, e.g. 1350                                                                                        |
| data.sequence_pages[i].layers             | Layers config: List of Layers Data, text,headline,content displayed                                                                |
| data.sequence_pages[i].layers[j].id       | Int, Card ID                                                                                                                       |
| data.sequence_pages[i].layers[j].type     | String, Supported Type: background,text,image,headline                                                                             |
| data.sequence_pages[i].layers[j].position | Dict of {"x": 0,"y": 0}, position of the text layer display on the main canvas                                                     |
| data.sequence_pages[i].layers[j].position | Dict of x,y position of the text layer display on the main canvas                                                                  |

Description-Behavior Mismatch

Low
Category
Not specified by scanner
Confidence
89% confidence
Finding

The manifest presents this as a Xiaohongshu post generator, but the API docs define social_media_posts with supported channel_profile values including general, instagram, xiaohongshu, and x-twitter. That indicates the implemented/documented capability is a generic multi-platform social media post generator rather than a Xiaohongshu-specific skill.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.