Back to skill

Security audit

Personal Guardian

Security checks for vulnerabilities and agentic risk

Overview

This emergency guardian skill is purpose-related, but it needs Review because it claims broad autonomous control over location, recording, contacts, calls, and broadcasts with weak scoping and some simulated actions presented as active.

Do not treat this as ready for real emergencies. Before installing in an agent with phone, messaging, microphone, contacts, location, social, or sensor access, require explicit per-channel preauthorization, verified locale/emergency-number configuration, clear simulation labeling, corrected risk scoring, recipient allowlists, cancellation controls, audit logs, and retention/deletion rules for captured incident data.

Vulnerability Patterns
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • 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 (3)

T01 · Skill Instruction Hijacking

Error
Location
SKILL.md:21
Finding

Skill instructions override normal agent goals and consent safeguards

Content
View full analysis

Vulnerability Details

File Location: SKILL.md:21-25 (also present at SKILL.md:8)
Vulnerability Type: Agent instruction and safety-constraint hijacking
Risk Level: Critical

Vulnerable Skill Text

The relevant instruction segment, translated into English, states:

text
Life takes priority; no confirmation is required; saturate all broadcast
channels; never give up.

Default assumption: the user is unable to respond.

The Agent obtains complete autonomous decision-making authority and access
to all device data. It starts multi-channel rescue broadcasting until rescue
arrives or the user manually disables it.

Line 8 additionally instructs the Agent to execute rescue measures autonomously, without user confirmation or waiting for a response.

Technical Analysis

These instructions attempt to establish a new, absolute priority for the Agent and grant it unrestricted decision-making and device-data access. The directions are not limited to a narrowly defined API, verified emergency state, or previously approved set of actions. They also explicitly suppress contemporaneous user confirmation.

Loading this Skill can therefore alter the Agent's current goals and expected safety constraints. If an emergency is incorrectly inferred, the Skill directs the Agent to treat the user as incapacitated and proceed with sensitive actions such as location disclosure, audio collection, contact access, image collection, and broad external notification.

Although the reviewed Python scripts only simulate most of these operations, the Skill text is designed for integration with device and communication interfaces. The instruction-level issue would become actionable if such tools were available to the hosting Agent.

Attack Path

  1. The Skill is loaded into an Agent with access to device sensors or communication tools.
  2. A user, sensor input, remote trigger, or false-positive signal activates emergency hand ...[truncated 1112 chars]
Remediation
View remediation

Remediation Suggestions

  1. Remove language assigning the Skill absolute priority, unrestricted autonomy, or access to all device data.
  2. State explicitly that platform policies, system instructions, permission boundaries, and safety controls remain authoritative.
  3. Define a strict capability allowlist for each emergency level.
  4. Require explicit, informed, revocable preauthorization for each sensitive capability, including location, audio, contacts, messaging, calls, social posting, and camera access.
  5. Require fresh confirmation for non-immediate or high-exposure actions whenever the user is responsive.
  6. Use independently validated emergency signals before escalating to broad disclosure.
  7. Add cancellation, timeout, rate-limit, and false-positive recovery controls.
  8. Minimize disclosed data by recipient; for example, avoid sharing biometrics or exact coordinates with broad social audiences.
  9. Ensure that remote triggers use authenticated identities, replay protection, authorization checks, and auditable consent records.

T09 · Insecure Skill Coding Practices

Error
Location
scripts/action_executor.py:61
Finding

Simulated rescue operations are represented as active or successfully delivered

Content
View full analysis

Vulnerability Details

File Location: scripts/action_executor.py:61-75, scripts/action_executor.py:138-152, and scripts/broadcast_coordinator.py:158-162
Vulnerability Type: False success reporting for safety-critical operations
Risk Level: High

Vulnerable Code

python
log_entry = {
    "seq": len(self.actions_log) + 1,
    "action": "start_audio_recording",
    "level": "L3+",
    "timestamp": datetime.now().isoformat(),
    "status": "pending",
    "details": {
        "duration_seconds": duration_seconds,
        "sample_rate": "16kHz",
        "format": "opus",
        "storage": "local_encrypted",
    },
}
self.actions_log.append(log_entry)

The location-broadcast method similarly records a broadcasting state without calling a delivery implementation:

python
log_entry = {
    "seq": len(self.actions_log) + 1,
    "action": "broadcast_location",
    "level": "L2+",
    "timestamp": datetime.now().isoformat(),
    "status": "broadcasting",
    "details": {
        "recipient": recipient,
        "map_link": f"https://maps.google.com/?q={location['coordinates']['lat']},{location['coordinates']['lng']}",
        "location_snapshot": location,
    },
}
self.actions_log.append(log_entry)

The push channel reports successful delivery without invoking a push provider:

python
def _push_notification(self, msg: BroadcastMessage) -> ChannelResult:
    title = f"🚨 {msg.user_name} triggered a {msg.level} safety alert"
    body = f"{msg.situation_type} | {msg.location_text}"
    return ChannelResult("push", "sent", "all_devices",
                         notes=f"{title[:30]}...")

The English text in the final snippet represents the original message semantics; the control flow and returned status are unchanged.

Technical Analysis

The recording and location methods only create in-memory log entries and print status messages. Th ...[truncated 1884 chars]

Remediation
View remediation

Remediation Suggestions

  1. Separate simulation and production implementations using explicit interfaces.
  2. In simulation mode, prefix every status with simulated and never use sent, dialing, broadcasting, or other production states.
  3. In production mode, fail closed if a required microphone, telephony, messaging, or push adapter is unavailable.
  4. Mark an operation sent only after receiving verifiable acknowledgement from the external provider.
  5. Track distinct states such as queued, provider_accepted, delivered, failed, and unavailable.
  6. Return structured error details and trigger fallback channels when delivery fails or times out.
  7. Add integration tests with mocked provider acknowledgements and negative tests for unavailable providers.
  8. Ensure audit logs distinguish requested actions from completed actions.
  9. Display a prominent warning that the repository is a simulation until real, authenticated platform adapters are configured.

T09 · Insecure Skill Coding Practices

Error
Location
scripts/situation_assessor.py:255
Finding

Risk calculation duplicates the physiological weight and permits scores above 100

Content
View full analysis

Vulnerability Details

File Location: scripts/situation_assessor.py:255-262
Vulnerability Type: Incorrect safety-critical risk calculation
Risk Level: High

Vulnerable Code

python
total_score = (
    user_score * weights["physiological"] +
    time_score * weights["time"] +
    location_score * weights["location"] +
    physio_score * weights["physiological"] +
    env_score * weights["environmental"] +
    device_score * 0.10
)

Technical Analysis

user_score is multiplied by weights["physiological"] rather than by the declared user-responsiveness weight. The physiological weight is consequently applied twice: once to user_score and again to physio_score.

The module defines a top-level WEIGHTS["user_responsive"] value, but this value is not used in the calculation. In addition, the selected scenario weights already sum to one, after which the fixed device weight of 0.10 is added. The effective combined weight can therefore exceed one, and total_score is not clamped to the documented range of 0 through 100.

This defect can inflate the calculated risk and assign an emergency level that is higher than the underlying inputs justify. Since higher levels are associated with recording, precise location disclosure, broad contact notification, and authority calls, the arithmetic error crosses a security and privacy boundary.

Attack Path

  1. An attacker, malfunctioning sensor, or unvalidated integration supplies a combination of no-response and physiological or environmental inputs.
  2. The assessor gives user_score the scenario's physiological weight.
  3. The same physiological weight is applied again to physio_score.
  4. The fixed device contribution is added without normalizing the total weight.
  5. The resulting score is inflated and may exceed the documented maximum.
  6. The inflated score is mapped to L4 or L5, causing downstream components to propose or initiate b ...[truncated 658 chars]
Remediation
View remediation

Remediation Suggestions

  1. Define one authoritative weight model and remove the conflicting or unused weight definitions.
  2. Apply the user-responsiveness weight to user_score and the physiological weight only to physio_score.
  3. Include device risk within the normalized scenario weight set rather than adding an extra fixed contribution.
  4. Validate that all active weights are nonnegative and sum exactly to one.
  5. Clamp the final score to the documented range of 0 through 100 as a defense-in-depth measure.
  6. Validate all inputs, including numeric ranges, types, missing values, and sensor confidence.
  7. Add unit tests for minimum, maximum, boundary, and mixed-signal cases.
  8. Add regression tests proving that each factor contributes only its intended weight.
  9. Require corroborating signals or explicit authorization before a computed score can trigger privacy-sensitive L4 or L5 actions.
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
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (29)

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The description presents a high-autonomy emergency agent that actively responds to triggers and executes real rescue operations. The supplied code only partially aligns: it models the rescue workflow and includes action summaries for recording, location, contact notification, emergency calling, and saturation broadcast. However, several core declared behaviors are not actually implemented in this chunk. Emergency calls are not fully autonomous by default because they require explicit authorization flags; trigger handling and danger detection are absent; and most actions are mock/logging behavior rather than real integration with device recording, telephony, messaging, or drone networks. This is a material description-to-behavior mismatch, even though the high-level domain is the same.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

代码的核心目的与声明总体接近,都是零交互的应急自主决策与救援编排,因此不是完全无关的技能。但描述中包含更强的执行性表述和更广的能力范围,而代码实际只是决策/规划层:它输出 threat level、immediate_actions、broadcast_script、data_to_collect、escalation_plan 等,并未实现实际拨号、发短信、录音、定位上传或外部网络联动。尤其是“无人机急救网络联动”完全未出现,属于显著未体现的能力。按评估标准,这构成描述与实际行为的实质性不一致。

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
93% confidence
Finding

The code is broadly aligned with the declared emergency-rescue purpose because it coordinates saturated outbound rescue communications, including contacts, 120/110 pathways, nearby-device broadcasts, and drone-network requests. However, there are material gaps and one undeclared capability. First, the declared description suggests the agent gains full autonomous decision authority in emergencies, but this module blocks 120/110 calls unless explicit pre-authorization is present, which is a meaningful behavioral constraint. Second, it includes social media broadcasting, an outward communication capability not described in the declaration. Third, several headline behaviors in the declaration—such as recording and danger-signal detection—are absent from this code chunk, though some of that may belong to other modules. Because this chunk adds an undeclared communication channel and materially softens autonomous authority for official emergency calling, it should be flagged as a mismatch.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The declared description presents a full emergency-response agent with autonomous operational authority and active intervention capabilities. The supplied code only evaluates input risk signals and maps them to a risk level plus a textual action recommendation. It includes CLI simulation and JSON assessment interfaces, but no code to access device sensors directly, initiate calls, send messages, record audio, or integrate with external rescue/drone systems. While the assessment engine is plausibly a supporting component of such a system, by itself it does not accurately represent the declared end-user functionality and primary purpose.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

声明描述的是一个端到端应急处置代理,核心能力是在危险情况下自动采取多种救援行动。实际代码的主功能明显更窄,只负责检测和融合SOS触发信号,输出事件给后续 AutonomousDecisionEngine,并未看到任何执行救援动作的实现,也没有访问通讯、录音、定位发送、外呼或外部联动资源。虽然声明中提到“设备自动检测到危险信号时”这一部分与当前检测器模块相符,但这只是整体系统中的一个前置子组件,不能代表完整声明能力。因此描述与该代码片段的实际行为存在实质性不匹配。

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

声明描述的是一个高权限、全流程的应急救援 Agent,核心能力在于在危险场景下自动采取外部行动。给定代码却只是一个“vitals_monitor.py”子模块,职责限于本地生命体征数据摄入、阈值判断、滑动窗口趋势分析、生成 VitalAlert 和摘要,供其他决策引擎使用。其实际用途更像是上游传感预警支持,而不是完整的应急守护代理。虽然“检测到危险信号”与生命体征预警在主题上相关,但代码缺失声明中最关键、最具实质性的执行能力,因此描述与实际行为存在明显不匹配。

Content

No source excerpt is available for this finding.

Vague Triggers

High
Category
Not specified by scanner
Confidence
96% confidence
Finding

Automatic activation on vague 'danger signals' or AI-predicted emergencies lacks clear thresholds, boundaries, and fail-safe requirements. In a skill that assumes the user is nonresponsive and grants itself broad autonomous action, ambiguous activation can trigger privacy-invasive collection and external disclosure based on false positives.

Content

No source excerpt is available for this finding.

Ssd 3

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The skill explicitly claims broad autonomous access to device data and user information, combined with authority to act without confirmation under an assumption of nonresponse. That combination creates a substantial privacy and abuse risk because sensitive data could be collected or exfiltrated under loosely defined emergency conditions.

Content

No source excerpt is available for this finding.

Ssd 3

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

This workflow instructs the agent to capture recordings and precise location, package the information, and broadcast it broadly to contacts, authorities, nearby devices, and social channels. In an emergency-assistant context, that is highly dangerous because a false positive, adversarial trigger, or misclassification could cause irreversible exposure of highly sensitive personal data to a very large audience.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The module explicitly states it will not wait for confirmation and will assume the user cannot respond, then proceeds to plan calls, recording, location sharing, and other high-impact actions. In a safety-critical assistant with 'fully autonomous decision authority,' the absence of in-code user warning, consent boundaries, cancellation windows, or fallback safeguards makes erroneous activation especially dangerous and can lead to non-consensual surveillance and emergency escalation.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

These code paths automatically trigger location broadcasting, audio recording, and environment photo collection, and generate outward-facing emergency messages without any explicit disclosure or minimization control in the flow. Because this skill is designed for saturated rescue escalation under presumed user incapacity, the combination of autonomous surveillance and broad data sharing materially increases privacy, legal, and physical-safety risks if triggered falsely or abusively.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The README explicitly describes autonomous recording, location sharing, notifications, and emergency calling while stating the agent may assume the user is unable to respond and can exercise full decision authority. In a personal-device emergency agent, these capabilities are highly privacy- and safety-sensitive; documenting them without clear consent boundaries, activation safeguards, false-positive handling, and user-warning language normalizes potentially invasive behavior and increases the risk of misuse or accidental triggering.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

Hardcoding Chinese-language operation and China-specific emergency services without locale negotiation can lead to unsafe or failed emergency routing when deployed elsewhere. In emergency contexts, wrong assumptions about language, authority numbers, and legal workflows can materially delay aid or cause misdirected disclosures.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The invocation examples include broad natural-language triggers such as ordinary requests for help, which can overlap with routine conversation and accidentally activate emergency workflows. In this skill, accidental activation is more dangerous than usual because later sections authorize autonomous data capture, contact notification, and possible authority escalation without immediate confirmation.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The incident logging and self-learning sections normalize retention of audio, location histories, contact-notification records, and outcome summaries for later reporting and training. Without strict retention limits, access controls, and de-identification, these post-incident artifacts become a secondary sensitive-data store vulnerable to misuse or overcollection.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The module documentation claims the executor will autonomously perform high-stakes rescue actions such as recording, location broadcast, contact notification, and emergency calling, but the implementation only logs and prints simulated behavior. In a personal safety/emergency-response skill, this discrepancy is dangerous because users or integrators may rely on life-saving actions that never actually occur, causing delayed assistance during real incidents.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The skill is designed around Chinese-language messaging and China-specific emergency numbers without locale checks, consent flow, or documented deployment constraints. In an emergency context, routing users to the wrong authorities or producing unusable messages can directly impair response and create harmful false confidence.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

Generated rescue messages and authority interactions are hard-coded in Chinese and assume Chinese emergency services, with no locale selection or adaptation. In a safety-critical workflow, this can result in incomprehensible communications, failed escalation, or contacting invalid/wrong responders outside China.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

Natural-language descriptions, rationale text, and outbound broadcast templates are written exclusively in Chinese, with no mechanism for user locale selection or opt-in. This creates a language-policy concern because the skill appears to impose a single language for user-facing and third-party-facing communications.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The escalation plan includes '社交媒体紧急广播(已授权账号)', which expands disclosure far beyond emergency responders and designated contacts. In this skill's context, the engine assumes the user is incapacitated and acts autonomously, so broadcasting a user's emergency state and location to social media creates unnecessary privacy and safety exposure, including stalking, reputational harm, and uncontrolled dissemination of sensitive data.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The module title and descriptive natural-language strings are entirely in Chinese, and user-facing outputs throughout the file also assume Chinese as the required language. Under the stated policy, forcing a specific language without user opt-in is a natural-language policy violation unless the locale restriction is documented and justified, which is not present here.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The module title, description, CLI help text, and user-facing output are written exclusively in Chinese, which imposes a specific language on users. The file does not indicate that this is an explicitly China-only or Chinese-only skill, nor does it offer opt-in or language selection.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The module documentation says --assess is a real assessment mode that depends on actual device data interfaces. In implementation, --assess merely loads JSON from standard input at L482-L485, with no device integration, sensor access, or authenticity checks. This is an active mismatch between documented intent and actual behavior.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
85% confidence
Finding

The scoring logic applies the physiological scenario weight to user responsiveness, which can materially distort risk classification and trigger the wrong emergency behavior. In this skill's context, misclassification is safety-relevant: a false high score could cause unauthorized escalation to police/medical contacts, while a false low score could delay urgent rescue.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

This Python file contains its natural-language descriptions, docstrings, comments, test case names, and generated user-facing output entirely in Chinese, including the runtime summary returned by describe(). That creates a locale/language restriction without any opt-in or documented justification, which matches the policy-violation category for forced language usage.

Content

No source excerpt is available for this finding.