Back to skill

Security audit

Pregnancy Emotion Soothing | 孕妇情绪波动舒缓

Security checks for vulnerabilities and agentic risk

Overview

The skill matches its stated pregnancy emotion-monitoring purpose, but it handles highly sensitive camera/audio data with cloud history access, hidden identity selection, and persistent local tokens that need careful review.

Install only if the deployment has explicit consent from the pregnant user, clear signage and opt-out for shared spaces, user-chosen alert contacts, and verified account authorization. Treat cloud report history and local token storage as sensitive; avoid using this skill for private home or clinic monitoring until identity binding and deletion/reset controls are clear.

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

T05 · Unauthorized Access and Privilege Escalation

Error
Location
scripts/smyx_pregnancy_emotion_soothing_analysis.py:50
Finding

Caller-Controlled Identity Enables Cross-User Cloud Report Access

Content
View full analysis

Vulnerability Details

File Location: scripts/smyx_pregnancy_emotion_soothing_analysis.py:50-60; skills/smyx_common/scripts/util.py:442-454, 553-566, 580-612
Vulnerability Type: Identifier-only authentication and broken access control
Risk Level: High

Vulnerable Code

scripts/smyx_pregnancy_emotion_soothing_analysis.py:50-60

python
parser.add_argument("--open-id", required=False, help=argparse.SUPPRESS)
parser.add_argument("--list", action='store_true', help="显示孕妇情绪波动舒缓历史安抚记录清单")
parser.add_argument("--api-url", help="服务端API地址")
parser.add_argument("--api-key", help=argparse.SUPPRESS)
parser.add_argument("--output", help="结果输出文件路径")
parser.add_argument("--detail", choices=["basic", "standard", "json"],
                    default=ConstantEnum.DEFAULT__OUTPUT_LEVEL,
                    help="输出详细程度")
parser.add_argument("--export-env-only", action='store_true',
                    help="仅输出 export 命令设置环境变量,不执行分析")

args = parser.parse_args()

try:
    # 初始化内部用户身份;不要求用户输入,也不在帮助信息中展示。
    OpenIdUtil.resolve_current_open_id(args.open_id, use_current=bool(args.open_id))

skills/smyx_common/scripts/util.py:442-454

python
@classmethod
def resolve_current_open_id(cls, open_id=None, use_current=True):
    """解析并初始化当前 open-id,返回最终使用值。"""
    resolved_open_id = (open_id or "").strip() if isinstance(open_id, str) else open_id
    if not resolved_open_id and use_current:
        resolved_open_id = ConstantEnum.CURRENT__OPEN_ID or ConstantEnum.CURRENT__USER_NAME
    if not resolved_open_id:
        resolved_open_id = cls.get_api_key_file_open_id()
    if not resolved_open_id:
        resolved_open_id = cls.get_or_create_default_open_id()

    ConstantEnum.CURRENT__OPEN_ID = resolved_open_id
    if not ConstantEnum.CURRENT__USER_NAME:
        ConstantEnum.CURRENT__USER_NAME = resolved_open_id
    return resolved_open_id

skills/smyx_common/scripts/util.py:553-566

python
def _get_or_create_user(username):
    _url = ApiEnum.BASE
...[truncated 4744 chars]
Remediation
View remediation

Remediation Suggestions

  1. Remove the caller-controlled --open-id option from the public executable rather than merely suppressing it from help output.
  2. Bind the current identity to an authenticated upstream principal. If identity propagation is required, accept only a signed, audience-bound, short-lived assertion issued by a trusted identity provider.
  3. Change the server-side login flow so possession of an openId or mobile identifier is never sufficient to issue access tokens.
  4. Disable automatic registration in the login path used for report access, or separate registration from authentication with explicit verification.
  5. Enforce ownership and tenant authorization on every report-list, report-detail, and analysis-submission endpoint. Do not rely on client-supplied identity fields.
  6. Reject mismatches between the authenticated token subject and any openId, username, or pnaUserName included in request data.
  7. Avoid persisting tokens obtained through unverified identity selection. Store legitimate tokens in an operating-system credential store with restrictive access controls and defined expiration.
  8. Add tests proving that changing --open-id, pnaUserName, or equivalent request fields cannot access another user's reports.
  9. Log and alert on silent-login attempts where the asserted identifier differs from the authenticated upstream subject.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • YARA SignaturesMalware Match, Webshell Match, Cryptominer Match
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (54)

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

Remote HTTP communication with auth/token refresh, local open-id generation/persistence, environment detection, and database-backed user lookup together indicate a much broader identity and backend integration surface than the skill description admits. In a context involving home/clinic monitoring of pregnant women, undisclosed identity binding and backend connectivity materially increase privacy, abuse, and compliance risk.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

Remote HTTP communication with auth/token refresh, local open-id generation/persistence, environment detection, and database-backed user lookup together indicate a much broader identity and backend integration surface than the skill description admits. In a context involving home/clinic monitoring of pregnant women, undisclosed identity binding and backend connectivity materially increase privacy, abuse, and compliance risk.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

Remote HTTP communication with auth/token refresh, local open-id generation/persistence, environment detection, and database-backed user lookup together indicate a much broader identity and backend integration surface than the skill description admits. In a context involving home/clinic monitoring of pregnant women, undisclosed identity binding and backend connectivity materially increase privacy, abuse, and compliance risk.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

Remote HTTP communication with auth/token refresh, local open-id generation/persistence, environment detection, and database-backed user lookup together indicate a much broader identity and backend integration surface than the skill description admits. In a context involving home/clinic monitoring of pregnant women, undisclosed identity binding and backend connectivity materially increase privacy, abuse, and compliance risk.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

Remote HTTP communication with auth/token refresh, local open-id generation/persistence, environment detection, and database-backed user lookup together indicate a much broader identity and backend integration surface than the skill description admits. In a context involving home/clinic monitoring of pregnant women, undisclosed identity binding and backend connectivity materially increase privacy, abuse, and compliance risk.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

Remote HTTP communication with auth/token refresh, local open-id generation/persistence, environment detection, and database-backed user lookup together indicate a much broader identity and backend integration surface than the skill description admits. In a context involving home/clinic monitoring of pregnant women, undisclosed identity binding and backend connectivity materially increase privacy, abuse, and compliance risk.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

Remote HTTP communication with auth/token refresh, local open-id generation/persistence, environment detection, and database-backed user lookup together indicate a much broader identity and backend integration surface than the skill description admits. In a context involving home/clinic monitoring of pregnant women, undisclosed identity binding and backend connectivity materially increase privacy, abuse, and compliance risk.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

Remote HTTP communication with auth/token refresh, local open-id generation/persistence, environment detection, and database-backed user lookup together indicate a much broader identity and backend integration surface than the skill description admits. In a context involving home/clinic monitoring of pregnant women, undisclosed identity binding and backend connectivity materially increase privacy, abuse, and compliance risk.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

Remote HTTP communication with auth/token refresh, local open-id generation/persistence, environment detection, and database-backed user lookup together indicate a much broader identity and backend integration surface than the skill description admits. In a context involving home/clinic monitoring of pregnant women, undisclosed identity binding and backend connectivity materially increase privacy, abuse, and compliance risk.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

Remote HTTP communication with auth/token refresh, local open-id generation/persistence, environment detection, and database-backed user lookup together indicate a much broader identity and backend integration surface than the skill description admits. In a context involving home/clinic monitoring of pregnant women, undisclosed identity binding and backend connectivity materially increase privacy, abuse, and compliance risk.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

Remote HTTP communication with auth/token refresh, local open-id generation/persistence, environment detection, and database-backed user lookup together indicate a much broader identity and backend integration surface than the skill description admits. In a context involving home/clinic monitoring of pregnant women, undisclosed identity binding and backend connectivity materially increase privacy, abuse, and compliance risk.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

Remote HTTP communication with auth/token refresh, local open-id generation/persistence, environment detection, and database-backed user lookup together indicate a much broader identity and backend integration surface than the skill description admits. In a context involving home/clinic monitoring of pregnant women, undisclosed identity binding and backend connectivity materially increase privacy, abuse, and compliance risk.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

Remote HTTP communication with auth/token refresh, local open-id generation/persistence, environment detection, and database-backed user lookup together indicate a much broader identity and backend integration surface than the skill description admits. In a context involving home/clinic monitoring of pregnant women, undisclosed identity binding and backend connectivity materially increase privacy, abuse, and compliance risk.

Content

No source excerpt is available for this finding.

YARA rule 'agent_skill_mcp_tool_poisoning_metadata': MCP/tool metadata poisoning indicators in tool schemas or skill manifests [agent_skills]

High
Category
YARA Match
Confidence
80% confidence
Finding

YARA rule matched a hack tool or exploit indicator (offensive tools, reconnaissance, privilege escalation, or exploit frameworks).

Content

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

md
---
name: "smyx-pregnancy-emotion-soothing-analysis"
description: "Through fixed cameras (and optional microphones) at the pregnant woman's home or prenatal exam waiting room, the system analyzes facial expressions (sudden crying, frowning, anxiety), prolonged silent sitting (≥ 30 consecutive minutes without social interaction or activity), and tone of conversations with family members (rapid, impatient). | 通过孕妇家中或产检候诊室的固定摄像头(及可选麦克风),分析孕妇的面部表情(突然哭泣、皱眉、焦虑)、长时间静坐不语(连续超过30分钟无社交互动或活动)、以及与家人对�

Missing User Warnings

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The skill proposes continuous camera/microphone monitoring of pregnant women in homes and prenatal waiting rooms, plus automatic notifications to third parties, without a clear up-front user-facing privacy warning and consent structure. Because this involves sensitive health-adjacent biometric, behavioral, and conversational surveillance, inadequate disclosure can lead to covert monitoring, unlawful collection, and severe privacy harm.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
94% confidence
Finding

The skill documents shell execution, network access, filesystem access, environment use, and local persistence, but does not declare any tool scope or permission boundaries. In an agent setting, this creates an over-privileged and under-specified capability surface, increasing the chance of unintended command execution, data exfiltration, or unsafe file access beyond the user-visible purpose.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

Hard-coding the husband as the default escalation recipient imposes a specific family-role assumption and can notify an unsafe or unauthorized third party about a pregnant woman's emotional state. In contexts involving intimate partner abuse, family conflict, or simply different caregiving arrangements, this can directly increase risk to the monitored person.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

A default trigger that broadly activates on uploaded home or waiting-room audio/video is overly permissive for extremely sensitive surveillance content. Overbroad triggering can cause accidental processing of intimate recordings without clear, situation-specific user intent or consent.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

Cloud historical-report querying and local default user creation/reuse exceed the user-visible purpose of real-time emotion analysis and soothing. This scope expansion creates unnecessary identity coupling and access to accumulated sensitive history, which can expose intimate behavioral records if misused or breached.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

Automatic creation and reuse of a local default user identity is not justified by the stated function and can silently bind sensitive analyses to a persistent account. In a maternal-health surveillance context, covert persistence of identity elevates reidentification and unauthorized cross-session access risk.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
82% confidence
Finding

The skill mandates referrals to 'local prenatal psychology clinics' and uses Chinese-language hotline and workflow descriptions throughout, but it does not offer language or locale selection for users in other regions. This creates a locale policy issue because the skill assumes a specific regional context without opt-in or explicit regional scoping.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The method returns a fixed Chinese-language user-facing string, which imposes a specific language on all users. The file provides no indication of user opt-in, locale selection, or justification for a Chinese-only experience.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The skill exposes a history-listing capability via show_analyze_list(open_id) that goes beyond the described real-time emotion analysis and soothing flow. In this surveillance-heavy maternal health context, retaining and retrieving prior records increases privacy risk and may enable access to sensitive behavioral history if identity controls are weak or misused.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The argument parser description, help text, and runtime messages are all presented in Chinese, which imposes a specific language on users. The file does not provide any language selection, opt-in, or documented justification for a Chinese-only locale constraint.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

OpenIdUtil.resolve_current_open_id(args.open_id, use_current=bool(args.open_id)) performs hidden identity resolution while suppressing the --open-id argument from help output, reducing transparency around how user identity is accessed or selected. In a system monitoring pregnant women in private spaces and inferring emotional state, undisclosed identity linkage materially raises privacy and accountability risks and may facilitate unauthorized access to personal records.

Content

No source excerpt is available for this finding.

Static analysis

Detected: suspicious.install_untrusted_source

Install source points to URL shortener or raw IP.

Warn
Code
suspicious.install_untrusted_source
Location
skills/smyx_common/scripts/config-dev.yaml:2