Back to skill

Security audit

Low Altitude Guardian

Security checks for vulnerabilities and agentic risk

Overview

The skill is not clearly malicious, but it needs Review because it mixes advisory drone/eVTOL emergency guidance with autonomous-execution language and persistent knowledge updates that lack strong controls.

Install only for simulation, training, or offline advisory review. Do not connect its outputs to flight controllers, dispatch automation, or actuator-capable systems, and do not use the learning or ingestion workflows with untrusted files until path validation, approval gates, template integrity checks, and explicit human-review controls are added.

Vulnerability Patterns
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • 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
  • 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 (4)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/enterprise_kb_manager.py:238
Finding

Arbitrary File Write Through Unsanitized Knowledge-Base Index Fields

Content
View full analysis
Remediation
View remediation
Path: if not re.fullmatch(r"[A-Za-z0-9_-]{1,100}", name): raise ValueError("Invalid identifier") root = root.resolve() destination = (root / name).resolve() if destination.parent != root: raise ValueError("Path escapes storage root") return destination ``` 4. Apply validation separately to `incident_id`, `crisis_type`, `device_type`, and `crisis_level`. 5. Use normalized internal identifiers rather than raw imported labels for directory names. 6. Consider exclusive creation mode (`"x"`) or explicit collision handling to prevent silent overwrite. 7. Validate the entire imported event against a schema before indexing it. 8. Run ingestion under a low-privilege service account with write access limited to the intended data directory. ]]>

T02 · Agent Memory Poisoning

Error
Location
`. 5. `learn_from_feedback()` accepts the document without authentication or validation. 6. `_apply_kb_update()` modifies the template in place. 7. Future calls to `load_solution_templates()` load the poisoned template as trusted knowledge. 8. Later crisis assessments may produce altered actions, inflated confidence, or inaccurate safety scoring. A secondary path uses an absolute or traversal `template` value to modify another accessible JSON file rather than a packaged solution template. ### Impact Asses ...[truncated 903 chars]:708
Finding

Unauthenticated Feedback Can Persistently Poison Safety Templates

Content
View full analysis
{update.get('field')}") def _apply_kb_update(update: dict): """将学习到的参数更新应用到解决方案模板。""" template_name = update.get("template", "") template_path = SOLUTION_TEMPLATES_DIR / template_name if not template_path.exists(): print(f" [警告] 模板文件 {template_name} 不存在,跳过更新") return with open(template_path, encoding="utf-8") as f: tmpl = json.load(f) # 递归设置嵌套字段 field_path = update.get("field", "").split(".") obj = tmpl for ...[truncated 3719 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/crisis_engine.py:530
Finding

Safety-Critical Solution Preconditions Are Ignored During Plan Selection

Content
View full analysis
list: """ 匹配可用的解决方案。 Returns: 按评分排序的 DecisionPlan 列表 """ templates = load_solution_templates() crisis_key = f"{classification.crisis_type}.{classification.sub_type}" plans = [] # 精确匹配 if crisis_key in templates: tmpl = templates[crisis_key] plan = _template_to_plan(tmpl, snapshot, source="knowledge_base") plans.append(plan) # 模糊匹配(同类型其他方案) for key, tmpl in templates.items(): if key != crisis_key and key.startswith(classification.crisis_type): plan = _template_to_plan(tmpl, snapshot, source="knowledge_base") plan.confidence *= 0.7 # 模糊匹配降低置信度 plans.append(plan) # 如果没有匹配方案,启动应急推理 if not plans: emergency_plan = _emergency_reasoning(classification, snapshot) plans.append(emergency_plan) # 评分和排序 for plan in plans: if plan.safety_score.is_vetoed: plan.is_vetoed = True plan.veto_reason = f"人员安全评分 {plan.safety_score.human_safety} < 80,方案被否决" # 有效方案排在前面,按总分降序 plans.sort(key=lambda p: (not p.is_vetoed, p.safety_score.total_score), reverse=True) return plans def _template_to_plan(template: dict, snapshot: dict, source: str = "knowledge_base") -> DecisionPlan: """将模板转换为决策方案并评分。""" timestamp = datetime.now(timezone.utc).strftime("%Y%m%d-%H%M%S") plan_id = f"DEC-{timestamp}-{template.get('template_id', '000')}" # 根据快照上下文评估安全得分 safety = _evaluate_safety(template, snapshot) return DecisionPlan( plan_id=plan_id, name=template.get("name", "未命名方案"), source=source, confidence=templa ...[truncated 3242 chars]
Remediation
View remediation
15%"` with a typed, declarative schema rather than using dynamic evaluation. 4. Never use `eval()` to interpret template conditions. Implement explicit comparison operators and type checks. 5. Reject templates with missing, malformed, unknown, or contradictory prerequisite fields. 6. Mark plans with incomplete telemetry as ineligible or require explicit human review. 7. Derive confidence from validated applicability and current evidence instead of copying only the historical success rate. 8. Include a machine-readable explanation of every passed and failed prerequisite. 9. Add tests covering: - Wrong device types. - Unsupported crisis levels. - Missing GPS. - Insufficient battery. - Excessive wind. - Missing home point. - Missing parachute or other required hardware. 10. Keep all outputs advisory by default and require a certified, independently validated safety layer before any external control system can act on them. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/incident_reporter.py:488
Finding

Incident Identifier Path Traversal Allows Unauthorized JSON File Reads

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (68)

Intent-Code Divergence

Critical
Category
Not specified by scanner
Confidence
99% confidence
Finding

The generated Markdown explicitly instructs that the device autonomously executes emergency actions and may auto-execute after a timeout, directly contradicting the declared non-flight-control, analysis-only scope. In a low-altitude aviation emergency context, such language can be integrated into SOPs or trusted by operators as implementation guidance, effectively promoting autonomous control behavior without the required engineering, validation, or system boundaries.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Critical
Category
Not specified by scanner
Confidence
99% confidence
Finding

The JSON output encodes machine-readable execution modes like 'autonomous', 'autonomous_notify', and 'recommend_timeout_5s', which downstream systems could interpret as actionable control policies. Because this is a structured interface, the risk is higher than prose alone: it can enable unsafe automation or be mistakenly consumed by orchestration components despite the skill's stated analysis-only purpose.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
95% confidence
Finding

The README claims a full closed-loop workflow including decision and execution for low-altitude unmanned devices, which conflicts with the stated analysis-only, non-flight-control scope in the metadata. In a safety-critical domain, overstating autonomy can cause operators or integrators to rely on the skill for real-world control decisions it was not supposed to perform, creating dangerous misuse risk.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The crisis response table states that for L5/L4 scenarios the system performs 'autonomous execution' or 'auto-executes after timeout,' directly contradicting the claimed non-control role. In an emergency aviation context, this can normalize unsafe deployment patterns where software recommendations are treated as authority to take consequential real-world actions without verified human oversight.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The README permits autonomous action in severe scenarios without a conspicuous warning that such outputs could influence real-world vehicle behavior and safety outcomes. In a context involving drones and eVTOLs, omission of strong warnings materially increases the chance that users operationalize advisory logic as direct actuation logic.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

High
Category
Not specified by scanner
Confidence
96% confidence
Finding

The README ends with an analysis-only disclaimer, but earlier sections describe autonomous execution and device-side closed-loop behavior. This contradiction is dangerous because users may trust the stronger operational claims rather than the disclaimer, leading to unsafe assumptions in a life-safety environment.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

The skill documents creation and persistence of incident reports and learning feedback artifacts, which materially exceeds a simple analysis-only promise. In a high-stakes emergency domain, undisclosed storage of incident data and self-learning artifacts can create safety, privacy, and governance risks, especially if users assume ephemeral in-session processing only.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

The skill documents creation and persistence of incident reports and learning feedback artifacts, which materially exceeds a simple analysis-only promise. In a high-stakes emergency domain, undisclosed storage of incident data and self-learning artifacts can create safety, privacy, and governance risks, especially if users assume ephemeral in-session processing only.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The skill documents creation and persistence of incident reports and learning feedback artifacts, which materially exceeds a simple analysis-only promise. In a high-stakes emergency domain, undisclosed storage of incident data and self-learning artifacts can create safety, privacy, and governance risks, especially if users assume ephemeral in-session processing only.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The skill documents creation and persistence of incident reports and learning feedback artifacts, which materially exceeds a simple analysis-only promise. In a high-stakes emergency domain, undisclosed storage of incident data and self-learning artifacts can create safety, privacy, and governance risks, especially if users assume ephemeral in-session processing only.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The skill documents creation and persistence of incident reports and learning feedback artifacts, which materially exceeds a simple analysis-only promise. In a high-stakes emergency domain, undisclosed storage of incident data and self-learning artifacts can create safety, privacy, and governance risks, especially if users assume ephemeral in-session processing only.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The skill documents creation and persistence of incident reports and learning feedback artifacts, which materially exceeds a simple analysis-only promise. In a high-stakes emergency domain, undisclosed storage of incident data and self-learning artifacts can create safety, privacy, and governance risks, especially if users assume ephemeral in-session processing only.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

The skill documents creation and persistence of incident reports and learning feedback artifacts, which materially exceeds a simple analysis-only promise. In a high-stakes emergency domain, undisclosed storage of incident data and self-learning artifacts can create safety, privacy, and governance risks, especially if users assume ephemeral in-session processing only.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
92% confidence
Finding

Claiming 'zero dependency' while documenting Python script dependencies for knowledge matching, report generation, and updates is misleading. Although less severe than hidden autonomy, this can still cause unsafe deployment assumptions, skipped dependency review, and inadequate sandboxing for the external scripts the skill expects.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The file explicitly says the skill does not execute actual flight control, yet elsewhere prescribes autonomous execution and auto-execution-on-timeout intervention modes. In a drone/eVTOL emergency context, that contradiction can mislead integrators into deploying an advisory artifact as if it were non-operational, increasing the chance of unsafe automation or overreliance.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

High
Category
Not specified by scanner
Confidence
96% confidence
Finding

The boundary section says the skill does not connect to flight control or hardware and does not execute actual flight control, but other sections introduce integrated-mode scripts and autonomous execution semantics. In a safety-critical domain, inconsistent boundary statements are dangerous because they undermine safe integration decisions and can mask real operational risk.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
96% confidence
Finding

该模板虽然宣称是“分析辅助工具”,但实际包含按步骤组织的具体飞行控制动作,如切换导航模式、悬停、返航和紧急降落。这会让下游代理或集成方将其当作可直接执行的控制序列使用,造成能力边界混淆,在导航失效场景中可能触发不安全自动化决策。

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The template contains concrete flight-control commands such as return-to-home, climb, navigate, and land, which conflicts with the stated boundary that the skill is only for analysis assistance and does not perform actual control. Even if intended as advisory output, packaging these as executable action steps increases the chance that an integrating agent or operator treats them as authoritative control instructions in a safety-critical context.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The template does not merely analyze a crisis; it specifies concrete flight-control actions such as reducing altitude, navigating to shelter, and performing an emergency landing with operational parameters. This contradicts the stated boundary that the skill is only an analysis aid, and if downstream systems or operators treat these steps as executable commands, it could enable unsafe autonomous or semi-autonomous control decisions in safety-critical conditions.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The template encodes concrete flight-control commands such as mode switching, altitude changes, navigation, landing, and motor disarm, which conflicts with the stated scope that the skill is only an analysis aid and does not perform real control. In an emergency-response context, packaging executable-looking control steps as a machine-readable template increases the risk that an orchestrator or downstream agent will treat them as authoritative commands and issue unsafe autonomous actions without proper certified control safeguards.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

High
Category
Not specified by scanner
Confidence
94% confidence
Finding

The action descriptions are written as imperative operational procedures for a live aircraft emergency, implying actual execution rather than abstract analysis. Because this skill operates in a safety-critical aviation domain, ambiguity about whether these are recommendations or commands materially raises the chance of unsafe automation, operator over-trust, or accidental integration into flight-control workflows.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
96% confidence
Finding

The template contains concrete emergency actions such as parachute deployment, steering, hazardous-payload jettison, and battery cut-off, which goes beyond a purely analytical aid and can directly influence real-world aircraft behavior if consumed by an orchestrator. In an aviation emergency context, ambiguous boundaries between 'recommendation' and 'execution-ready procedure' are dangerous because downstream systems or operators may treat these fields as commandable actions without adequate safeguards, validation, or human authorization.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The template includes hazardous physical interventions, especially payload jettison and battery disconnection during imminent impact, which can cause direct harm to people or property if triggered or followed inappropriately. In a low-altitude unmanned aircraft emergency setting, these are safety-critical actions requiring strict legal, operational, and environmental controls; presenting them as generic template steps without strong gating or authorization materially increases misuse risk.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
95% confidence
Finding

The reference text explicitly uses imperative operational language such as '执行方案A/执行方案C', which conflicts with the stated analysis-only scope of the skill. In a time-critical aviation emergency context, an agent or operator may treat these outputs as authoritative control instructions, creating automation bias and increasing the chance that the skill is used as de facto flight-decision authority without required human/system safeguards.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
96% confidence
Finding

The script materially expands the skill from analysis support into generating, versioning, and publishing formal enterprise emergency plans. In a safety-critical domain, this creates operational authority drift: users may rely on auto-generated procedures as approved runbooks even though the skill is described as analysis-only, increasing the chance of unsafe decisions based on unvalidated content.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.