Back to skill

Security audit

PREGNA-RISK: Pregnancy Risk in SLE/APS

Security checks for vulnerabilities and agentic risk

Overview

This skill is a coherent pregnancy risk calculator, but it gives high-stakes medical recommendations and handles patient data with insufficient safeguards.

Install only if you understand this is not validated medical decision support. Do not use it to make pregnancy, medication, monitoring, hospitalization, or delivery decisions without qualified obstetric, maternal-fetal medicine, and rheumatology review. Avoid sending real patient identifiers or protected health information through the JSON mode unless your environment has appropriate privacy controls and logging safeguards.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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 (3)

T09 · Insecure Skill Coding Practices

Error
Location
pregna_risk.py:116
Finding

Unvalidated JSON Factor Values Can Corrupt Clinical Risk Results

Content
View full analysis
float: """Compute deterministic PREGNA-RISK score.""" score = 0.0 for factor_key, present in patient.items(): if present and factor_key in RISK_FACTORS: score += RISK_FACTORS[factor_key]["weight"] return max(score, 0) # floor at 0 ``` The same implicit truth-value handling is used when selecting factors for Monte Carlo analysis: ```python active_factors = [k for k, v in patient.items() if v and k in RISK_FACTORS] ``` The JSON interface passes externally supplied values to these functions without schema validation: ```python data = json.loads(sys.stdin.read()) patient = data.get("factors", {}) pid = data.get("patient_id", "ANON") score = compute_score(patient) cat, rec = classify_risk(score) mc = monte_carlo_ci(patient) ``` ### Technical Analysis The type annotation `Dict[str, bool]` is not enforced at runtime. The JSON interface does not verify that `data` and `factors` are objects or that every factor value has the exact Boolean type. Python interprets many non-Boolean values as truthy, including non-empty strings, non-empty arrays, non-empty objects, and nonzero numbers. Consequently, values such as `"false"` or `"no"` activate a risk factor even though they appear to express a negative response. The deterministic score and Monte Carlo analysis both use this unsafe interpretation. Malformed top-level structures can also trigger unhandled exceptions. For example, a JSON array has no `get` method, while a non-object `factors` value may have no `items` method. This creates an availability issue for integrations that repeatedly invoke the command. ### Attack Path 1. An application exposes or wraps the ` ...[truncated 1425 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
pregna_risk.py:27
Finding

Contradictory and Overlapping Clinical Factors Are Double-Counted

Content
View full analysis
40 GPL (isolated)", "weight": 8, "category": "serological" }, ``` The model also permits a protective quiescence state independently of active disease factors: ```python "disease_quiescent_6mo": { "label": "Disease quiescence >6 months (protective)", "weight": -12, "category": "disease_activity" }, ``` All selected factors are then added independently without cross-field checks: ```python def compute_score(patient: Dict[str, bool]) -> float: """Compute deterministic PREGNA-RISK score.""" score = 0.0 for factor_key, present in patient.items(): if present and factor_key in RISK_FACTORS: score += RISK_FACTORS[factor_key]["weight"] return max(score, 0) # floor at 0 ``` ### Technical Analysis The scoring implementation treats all input fields as independent. It does not enforce the semantic constraints contained in the labels and documentation. In particular: - `triple_apl` includes lupus anticoagulant and anticardiolipin positivity, but it can be combined with the explicitly isolated `la_positive` and `acl_high` factors. - Disease quiescence for more than six months can be selected alongside active nephritis or elevated disease activity. - No normalization or rejection occurs before deterministic scoring or Monte Carlo analysis. This permi ...[truncated 1558 chars]
Remediation
View remediation

T08 · Insecure Dependencies

Note
Location
SKILL.md:59
Finding

NumPy Dependency Is Installed Without Version or Integrity Pinning

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (4)

Ae4

Medium
Category
analysis-evasion
Confidence
80% confidence
Finding

Suspicious Unicode normalization or mixed-script content

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The skill provides specific pregnancy risk categories and management recommendations, including statements such as 'Defer pregnancy' and monitoring cadence, without an explicit warning that it is not a substitute for clinician judgment or validated medical decision support. In a high-stakes maternal-fetal context, users may over-trust the score and act on incomplete or non-validated guidance, creating a meaningful risk of patient harm through delayed care, inappropriate reassurance, or unsafe management decisions.

Content

No source excerpt is available for this finding.

Ae4

Medium
Category
analysis-evasion
Confidence
80% confidence
Finding

Suspicious Unicode normalization or mixed-script content

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The JSON/API mode ingests patient identifiers and medical risk-factor data from stdin and emits results without any privacy notice, consent boundary, minimization, or guardrails for sensitive health information. In a healthcare context this increases the chance of improper handling of protected health data, especially when the tool is embedded into larger logging, pipeline, or agent systems that may persist stdin/stdout contents.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.