Back to skill

Security audit

cosmetic-detect

Security checks for vulnerabilities and agentic risk

Overview

This skill does not contain code or persistence, but it directs agents to make sensitive appearance-based judgments about ethnicity, age, and cosmetic procedures from photos without adequate safeguards.

Review before installing. This skill should not be used on private individuals or third-party images without consent, and its ethnicity/ancestry, age, cosmetic-history, and naturalness outputs should not be treated as factual or used for employment, insurance, healthcare, identity, moderation, or reputational decisions.

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

other

Warning
Location
SKILL.md:19
Finding
Sensitive Demographic Inference and Racialized Appearance Profiling<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:19-39`; `references/analysis-framework.md:313-353` **Vulnerability Type**: `other: Sensitive Trait Profiling` **Risk Level**: Medium ### Vulnerable Code Snippets From `SKILL.md:19-39`: ```markdown ### Step 1: Initial Assessment - **Image quality**: Resolution, lighting, angle, makeup level. Low quality or heavy filters significantly reduce reliability — say so. - **Apparent ethnicity/ancestry**: Establishes anatomical baseline. A "high nose bridge" is normal for Europeans but statistically unusual for East Asians. - **Apparent age**: Sets expectations for skin quality, volume, aging signs. - **Filters/editing**: Check for digital manipulation (smoothing, warping, face-tuning) — flag these as NOT cosmetic surgery to avoid false positives. ### Step 2: Region-by-Region Analysis Analyze each region independently using indicators from the reference file. For each region assess: 1. Are features within normal range for the person's apparent ethnicity and age? 2. Are there specific indicators of surgical or non-surgical intervention? 3. Confidence level: Low / Medium / High ### Step 3: Cross-Region Coherence Check The most powerful detection layer. Natural faces have internal consistency. Look for: - **Ethnic coherence**: Do all features align with one consistent genetic background? (e.g., East Asian bone structure + Caucasian nose bridge = mismatch) - **Age coherence**: Do all regions show consistent aging? (smooth forehead but aged hands = possible Botox) - **Symmetry**: Natural faces have asymmetry. Excessive bilateral symmetry suggests correction. - **Proportion harmony**: Do ratios between features fall within natural ranges? ``` From `references/analysis-framework.md:313-353`: ```markdown ## 12. Ethnic Baseline References Detection accuracy depends on understanding what's "normal" for a given genetic background. These are statistical averages — individual variation is huge. ### East Asia ...[truncated 4426 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Remove all instructions requiring inference of ethnicity, ancestry, race, or genetic background from photographs. 2. Delete the demographic baseline section in `references/analysis-framework.md` and remove the “ethnic coherence” comparison. 3. Restrict analysis to directly observable, procedure-specific signs such as visible scars, contour irregularities, implant outlines, or expression changes. 4. Treat age as optional user-provided context rather than an attribute inferred by the agent. If approximate age is indispensable, use broad, non-identifying ranges and clearly state that appearance-based estimates are unreliable. 5. Replace “naturalness scores” with a non-numerical image-evidence assessment. Do not characterize a person's face or body as genetically coherent, unnatural, or inconsistent with a demographic group. 6. Require the output to identify plausible non-procedural explanations, including anatomy, aging, weight changes, orthodontics, makeup, filters, lighting, pose, and lens distortion. 7. Add an explicit rule prohibiting conclusions about whether a person has undergone a procedure based solely on demographic expectations. 8. Require consent-sensitive handling for third-party images and prohibit use for employment, insurance, healthcare eligibility, identity verification, or other high-impact decisions. 9. Retain uncertainty language, but clarify that an image-only assessment cannot establish medical or surgical history and is not a clinical diagnosis. ]]>
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • 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
Findings (7)

Harmful Content Injection

Critical
Category
Prompt Injection
Content
<a name="forehead"></a>

## 5. Forehead & Brow

### Botulinum Toxin (Botox / 肉毒素)

High-confidence indicators (in video/expression photos):

- Complete absence of forehead lines during brow elevation
- "Frozen" upper face with mobile lower face (the classic "Botox look")
Confidence
70% confidence
Finding
This content may contain harmful instructions that could cause physical harm if followed. CRITICAL: Review carefully before use.

Natural-Language Policy Violations

High
Confidence
99% confidence
Finding
The skill explicitly instructs the model to infer ethnicity or ancestry from a person's appearance and use that as an analytical baseline. Inferring sensitive attributes from images is dangerous because it invites profiling, is error-prone, and can produce discriminatory or demeaning outputs while lending false scientific legitimacy to protected-trait judgments.

Natural-Language Policy Violations

High
Confidence
99% confidence
Finding
The cross-region coherence step directs the model to decide whether facial features match a 'consistent genetic background,' including an example contrasting East Asian and Caucasian traits. This operationalizes sensitive-trait classification and compounds harm by tying cosmetic-surgery suspicion to racialized feature judgments, which can be both discriminatory and highly unreliable.

Natural-Language Policy Violations

High
Confidence
98% confidence
Finding
The required output template mandates reporting an 'ethnic baseline reference,' ensuring the sensitive-attribute inference is surfaced in final user-visible output rather than remaining incidental. This makes the harm more direct by normalizing race/ethnicity judgments as part of the product response and increasing the likelihood of discriminatory misuse or user distress.

Vague Triggers

Medium
Confidence
94% confidence
Finding
The trigger list is broad enough to activate on common requests like '鉴定一下' or '看看有没有整', which can sweep in casual appearance-judgment prompts and route them to a highly sensitive biometric-inference skill. In context, this is risky because the skill performs sensitive trait and cosmetic-procedure inference from images, so over-triggering increases the chance of processing content that should be declined or handled by a safer generic image-analysis flow.

Missing User Warnings

Medium
Confidence
91% confidence
Finding
This skill is designed to judge whether a person in a photo has had cosmetic procedures and assign 'naturalness' assessments, but the reference provides no user-facing safeguards about privacy, consent, sensitivity, or the risk of making ungrounded inferences about a person's body and medical history. That omission increases the chance the agent will perform invasive appearance analysis on third parties, produce stigmatizing claims, or encourage harassment and non-consensual profiling.

Natural-Language Policy Violations

Medium
Confidence
95% confidence
Finding
The reference explicitly instructs the model to infer what is 'normal' from ethnicity-specific facial baselines, which pushes the skill toward race-based appearance classification without consent or reliable grounding. In a tool that already makes sensitive judgments about whether someone has had cosmetic work, this can amplify stereotyping, misclassification, and discriminatory outputs, especially for mixed ancestry or users whose ethnicity is unknown from images.

Static analysis

No suspicious patterns detected.