Back to skill

Security audit

ADA-Predictor: Anti-Drug Antibody Risk Stratification

Security checks for vulnerabilities and agentic risk

Overview

This is a local medical risk predictor with no hidden system behavior, but it gives patient-specific treatment guidance without clear clinical safety limits.

Review before installing or using in any clinical workflow. Treat outputs as informational only, not medical advice or validated decision support; any patient-specific use should require qualified clinician review, explicit validation limits, and bounded runtime controls if exposed through an API or agent workflow.

Vulnerability Patterns
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (1)

T09 · Insecure Skill Coding Practices

Warning
Location
ada_predictor.py:28
Finding

Bypassable Input Validation and Unbounded Monte Carlo Resource Consumption

Content
View full analysis
dict: rng = np.random.default_rng(42) scores = [] for _ in range(n_sim): p = PatientProfile( biologic=patient.biologic, is_monoclonal_ab=patient.is_monoclonal_ab, concomitant_mtx=patient.concomitant_mtx, mtx_dose_mg_wk=patient.mtx_dose_mg_wk, hla_dqa1_05=patient.hla_dqa1_05, prior_biologic_failures=patient.prior_biologic_failures, baseline_crp_mg_l=max(0, rng.normal(patient.baseline_crp_mg_l, patient.baseline_crp_mg_l * 0.2)), disease_duration_years=patient.disease_duration_years, smoking=patient.smoking, bmi=max(15, rng.normal(patient.bmi, 2)), ) scores.append(compute_ada_risk(p)["risk_score"]) scores = np.array(scores) return { "mean_score": float(np.mean(scores)), "std_score": float(np.std(scores)), "ci_95": [float(np.percentile(scores, 2.5)), float(np.percentile(scores, 97.5))], "p_high_risk": float(np.mean(scores > 50)), "n_simulations": n_sim, } ``` ### Technical Analysis `PatientProfile.validate()` uses Python `assert` statements to enforce all accepted ranges. Assertions are intended for internal debugging rather than validation of potent ...[truncated 2586 chars]
Remediation
View remediation
None: allowed_biologics = { "adalimumab", "infliximab", "etanercept", "golimumab", "certolizumab" } if self.biologic not in allowed_biologics: raise ValueError(f"Unknown biologic: {self.biologic}") if not isinstance(self.prior_biologic_failures, int) or isinstance( self.prior_biologic_failures, bool ): raise TypeError("prior_biologic_failures must be an integer") if not 0 <= self.prior_biologic_failures <= 10: raise ValueError("prior_biologic_failures must be between 0 and 10") numeric_ranges = { "baseline_crp_mg_l": (self.baseline_crp_mg_l, 0, 500), "disease_duration_years": (self.disease_duration_years, 0, 80), "bmi": (self.bmi, 10, 80), } for name, (value, minimum, maximum) in numeric_ranges.items(): if isinstance(value, bool) or not isinstance(value, (int, float)): raise TypeError(f"{name} must be numeric") if not math.isfinite(value): raise ValueError(f"{name} must be finite") if not minimum <= value <= maximum: raise ValueError(f"{name} must be between {minimum} and {maximum}") if self.concomitant_mtx: if ( isinstance(self.mtx_dose_mg_wk, bool) or not isinstance(self.mtx_dose_mg_wk, (int, float)) or not math.isfinite(self.mtx_dose_mg_wk) or not 0 < self.mtx_dose_mg_wk <= 30 ): raise ValueError("mtx_dose_mg_wk must be finite and between 0 and 30") ``` 2. Validate and cap the simulation count before allocating memory or beginning work: ```python MAX_SIMULATIONS = 100_000 def monte_carlo_sensitivity( patient: PatientProfile, n_sim: int = 5000 ) -> dict: if not isinstance(n_sim, int) or isinstance(n_sim, bool ...[truncated 757 chars]
Vulnerability Patterns
  • 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
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (3)

Missing User Warnings

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The skill presents patient-specific risk stratification and concrete treatment-management recommendations without a prominent warning that it is not a substitute for clinician judgment or validated medical decision support. In a clinical context, users may over-trust the output and alter therapy, methotrexate dosing, or monitoring intervals based on an unvalidated tool, creating risk of patient harm.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The embedded code automatically emits treatment-changing recommendations such as maximizing methotrexate, changing TDM cadence, or considering switching biologic class, yet provides no runtime warning, confirmation gate, or limitation notice. Because this is healthcare guidance tied to individualized inputs, the lack of safety framing materially increases the chance of inappropriate clinical use and downstream patient harm.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
92% confidence
Finding

At L080, the inline comment says False for etanercept/certolizumab, implying certolizumab belongs with fusion proteins. But the code's biologic groupings at L103-L104 separate monoclonal antibodies from FUSION_PROTEINS, and later recommendation text at L170 and L177 refers to certolizumab as a pegylated/Fab' construct rather than a fusion protein. This is a documentation-level contradiction about the biologic classification used by the skill.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.