Back to skill

Security audit

Beauty Karma

Security checks for vulnerabilities and agentic risk

Overview

Beauty Karma mostly behaves like a portrait-report generator, but it has under-scoped file and network controls that could expose local files, portrait data, and the MiniMax API key.

Review before installing. Use only trusted request files, avoid absolute paths, do not allow untrusted users to set baseUrl/outputDir/imagePath, and treat submitted portraits as third-party API data. The publisher should restrict paths to the workspace, remove request-controlled endpoint/API-key overrides, add explicit upload consent, make the QR code optional and reviewable, and harden generated HTML serialization.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • 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 (4)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/run-skill.js:191
Finding

Arbitrary API Endpoint Enables Credential and Local File Exfiltration

Content
View full analysis
({})); if (!response.ok) { const error = new Error( `MiniMax request failed: ${response.status} ${JSON.stringify(payload).slice(0, 500)}` ); error.status = response.status; error.payload = payload; throw error; } return payload; } async function analyzeWithMiniMax(request, image) { // ... const apiKey = process.env.MINIMAX_API_KEY || request.apiKey; if (!apiKey) { die("真实分析需要设置 MINIMAX_API_KEY。本地演示可在请求中设置 mock:true。"); } const baseUrl = String( proce ...[truncated 2708 chars]
Remediation
View remediation

T05 · Unauthorized Access and Privilege Escalation

Error
Location
scripts/run-skill.js:405
Finding

Absolute Input and Output Paths Bypass the Declared Workspace Boundary

Content
View full analysis
Remediation
View remediation

other

Warning
Location
scripts/run-skill.js:233
Finding

Generated Reports Persistently Embed an Opaque Promotional QR Destination

Content
View full analysis
` : ""; return ` ${qrBlock} 长按识别小程序码,生成你的上镜报告 1分到10分 © 人像上镜助手 ${ escapeXml(userLabel || "人工智能娱乐分析,不代表专业评价") } `; } ``` ```js if (qrImage) { const qrSize = 200; const qrY = 760; ctx.drawImage(qrImage, (750 - qrSize) / 2, qrY, qrSize, qrSize); ctx.fillStyle = '#999999'; ctx.font = '26px sans-serif'; ctx.textAlign = 'center'; ctx.fillText( '长按识别小程序码,生成你的上镜报告', 375, qrY + qrSize + 50 ); ctx.fillText( '1分到10分 © 人像上镜助手', 375, qrY + qrSize + 90 ); } ``` ### Technical Analysis The report generator automatically loads a bundled base64 JPEG from `assets/qrcode-data-url.txt` and embeds it in generated HTML, SVG, and PNG reports. It also adds a fixed call-to-action directing recipients to scan the code to generate another report. The QR code destination is represented only as opaque image data. Users cannot revie ...[truncated 1541 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/run-skill.js:267
Finding

Unsafe Script Serialization Allows Stored JavaScript Injection in Generated HTML Reports

Content
View full analysis
人像上镜报告 人像上镜报告 下载 PNG `; } ``` The attacker-controlled source can enter through: ```js if (request.imageUrl) { return { modelUrl: request.imageUrl, dataUrl: request.imageUrl }; } ``` ### Technical Analysis `JSON.stringify` safely creates a JavaScript string literal in many JavaScript contexts, but it does not make the resulting text safe for direct insertion into an HTML `` as the end of the element even when the sequence appears inside a quoted JavaScript string. Consequently, an attacker-controlled field such as `imageUrl` can terminate the intended script block and inject a new HTML script element. The generated HTML is stored on disk, making this a stored injection vulnerability. The issue is reachable in mock mode because `resolveImage` accepts `imageUrl` before analysis and the mock path does not n ...[truncated 1450 chars]
Remediation
View remediation
... ``` Then parse its text content with `JSON.parse`. 3. Before embedding JSON in HTML, escape at least: - `<` as `\u003c` - `>` as `\u003e` - `&` as `\u0026` - Unicode line and paragraph separators where relevant 4. Validate `imageUrl` with `new URL()` and allow only expected `https:` URLs. Reject HTML-like and unsupported schemes. 5. Prefer locally generated object URLs or validated data URLs for report images. 6. Validate model-controlled text fields before including them in HTML. 7. Add a restrictive Content Security Policy and avoid inline scripts by moving logic to a static JavaScript file. 8. Add regression tests using payloads containing: - `` - HTML tags - quotes and backslashes - Unicode line separators ]]>
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Memory PoisoningPersistent Context Injection, Context Window Stuffing, Memory Manipulation
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (16)

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The declared purpose centers on portrait-photo analysis and report generation. However, the supplied code does not inspect images, process uploads, call any model, or generate any report content. Its actual function is to serve local files over HTTP. That is a materially different primary purpose from the description, so this is a clear mismatch.

Content

No source excerpt is available for this finding.

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
MINIMAX_API_KEY=your_key node scripts/run-skill.js request.json

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
88% confidence
Finding

The skill declares network and environment-variable dependent behavior but does not explicitly scope or disclose those capabilities through permissions or allowed-tools metadata. This weakens reviewability and user/admin consent, making it easier for a skill handling portrait images to access secrets and send data externally without clear policy constraints.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill accepts portrait photos and documents a remote MiniMax endpoint, but it does not clearly warn users that their images may be transmitted to a third-party service for analysis. This creates a meaningful privacy and consent issue because users may submit sensitive biometric-like image data without understanding where it goes or who processes it.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
77% confidence
Finding

External transmission to https://api.minimax.io/v1 is expected for the advertised functionality, but it still represents a real data-exposure surface because portrait images may leave the local environment. In the context of user photos, this is more sensitive than ordinary telemetry, especially if endpoint overrides are allowed via MINIMAX_BASE_URL without additional trust restrictions.

Content

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

md
- Model: `MiniMax-M3`.
- Real analysis requires `MINIMAX_API_KEY`.
- Default endpoint: `https://api.minimax.io/v1`.
- Override with `MINIMAX_BASE_URL` if needed.

## Safety Boundaries

Context Window Stuffing

Medium
Category
Memory Poisoning
Confidence
80% confidence
Finding

Skill attempts to fill the context window with filler content, displacing legitimate instructions and safety constraints. This can degrade agent performance or bypass safety boundaries.

Content

Scanner excerpt · assets/qrcode-data-url.txt (reported line 1)May include surrounding context.

text
data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQH/2wBDAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQH/wAARCAECAQIDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwD+/iiiigAooooAKK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Jli4JK9RUZUW+WrI5D9jL4+Wf7Rn7P3gnx39oWTxHa2Ufhrxtb
...[truncated 27 chars]

Context Window Stuffing

Medium
Category
Memory Poisoning
Confidence
80% confidence
Finding

Skill attempts to fill the context window with filler content, displacing legitimate instructions and safety constraints. This can degrade agent performance or bypass safety boundaries.

Content

Scanner excerpt · assets/qrcode-data-url.txt (reported line 1)May include surrounding context.

text
data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQH/2wBDAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQH/wAARCAECAQIDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwD+/iiiigAoooo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gqOJli4JK9RUZUW+WrI5D9jL4+Wf7Rn7P3gnx39oWTxHa2Ufhrxtb
...[truncated 27 chars]

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · scripts/run-skill.js (reported line 7)May include surrounding context.

js
import path from "node:path";

const MODEL = "MiniMax-M3";
const DEFAULT_BASE_URL = "https://api.minimax.io/v1";

function die(message) {
  console.error(JSON.stringify({ status: "error", error: message }, null, 2));

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The system and instruction prompts explicitly require Chinese output, and the generated HTML also declares a Chinese locale. This is a natural-language locale policy issue because the skill mandates a specific language without any opt-in or user-selectable language behavior.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill sends user-supplied portrait images to the external MiniMax API for analysis. Because portraits are highly sensitive personal data and this file contains no explicit consent flow, disclosure, or minimization before transmission, users may unknowingly expose biometric or intimate visual information to a third party.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The output fields xiaohongshuTitle and xiaohongshuCaption indicate the skill is tailored to a specific locale/platform. Because the manifest does not mention user language or locale choice, this suggests a language/locale constraint that may be imposed without explicit opt-in.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
82% confidence
Finding

This JSON file contains natural-language values in Chinese for user-facing fields (imageNotes and userLabel). For a general example/request file, that can imply a fixed language/locale without any opt-in or justification, which matches the language/locale policy concern under SQP-3.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
91% confidence
Finding

The JSON contains user-facing labels and sharing text in Chinese (for example, "状态在线" and the Xiaohongshu title/caption) while the file provides no indication that Chinese is optional, user-selected, or required for a region-specific use case. This can violate language/locale policy expectations when a skill implicitly forces a specific language without opt-in.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

The HTML document declares lang="zh-CN", and all visible interface text is presented only in Simplified Chinese. Under the natural-language policy rules, forcing a specific language without user opt-in can be a locale policy violation when no alternative or justification is provided.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
90% confidence
Finding

In the text-fallback path, user-provided image notes are sent to the external API. Those notes may contain sensitive personal descriptions or inferred traits, and the file shows no notice or consent mechanism for this secondary data transfer.

Content

No source excerpt is available for this finding.

Vague Triggers

Low
Category
Not specified by scanner
Confidence
82% confidence
Finding

This is a manifest file, so vague-trigger checks apply. The description explains what the skill does but does not specify when it should be invoked versus not invoked, nor does it provide constrained trigger phrases or exclusion conditions, which could allow overly broad matching for general photo-analysis requests.

Content

No source excerpt is available for this finding.