Back to skill

Security audit

BioLIMS SKILL

Security checks for vulnerabilities and agentic risk

Overview

This Bio-LIMS skill is purpose-aligned, but it exposes sensitive lab and patient workflows through overly broad and insecure command/server interfaces.

Install only in a controlled Bio-LIMS environment after tightening configuration: require HTTPS, avoid shared temp token caches, remove or protect diagnostic scripts that print secrets, bind any local servers to loopback with mandatory authentication, and gate destructive or workflow-changing commands behind explicit human confirmation and role checks. Treat this as a Review item because the skill can expose or change sensitive patient, sample, order, QC, and report data if run with real credentials.

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

T09 · Insecure Skill Coding Practices

Error
Location
scripts/biolims-openai-server.mjs:22
Finding

Unauthenticated Remote Shell Command Injection in the OpenAI-Compatible Server

Content
View full analysis
`"${a}"`).join(' ')}`; const result = execSync(cmd, { encoding: 'utf-8', timeout: 30000 }); return JSON.parse(result); } catch (err) { return { status: 500, msg: err.message }; } } ``` ```javascript // Direct command mode: /command arg1 arg2 if (message.startsWith('/')) { const parts = message.slice(1).split(/\s+/); return { command: parts[0], args: parts.slice(1) }; } ``` ```javascript // Validate API Key (optional) const authHeader = req.headers.authorization; if (API_KEY && authHeader !== `Bearer ${API_KEY}`) { res.writeHead(401, { 'Content-Type': 'application/json' }); res.end(JSON.stringify({ error: { message: 'Invalid API key', type: 'invalid_request_error' } })); return; } ``` ```javascript server.listen(PORT, () => { ``` ### Technical Analysis The server accepts a user-controlled chat message and supports a direct-command syntax beginning with `/`. The resulting command name and arguments are interpolated into a single command string passed to `execSync()`. Because `execSync()` executes a string through a shell, shell metacharacters embedded in the command or arguments can alter the intended command and execute additional operating-system commands. Wrapping arguments in double quotes is not sufficient because shell substitutions and quote-breaking input may still be interpreted. The service has two conditions that significantly increase exploitability: 1. `BIOLIMS_API_KEY` defaults to an empty s ...[truncated 1948 chars]
Remediation
View remediation

T05 · Unauthorized Access and Privilege Escalation

Error
Location
scripts/biolims-server.mjs:145
Finding

Unauthenticated HTTP Proxy Exposes Patient Data and Privileged Bio-LIMS Operations

Content
View full analysis
({ id: order.id, firstName: order.firstName, lastName: order.lastName, gender: order.gender, birthDate: order.birthDate, phone: order.phone, email: order.email, productId: order.productId, productName: order.productName, state: order.state, stateName: order.stateName, barcode: order.barcode, createTime: order.createTime, creatorNickname: order.creatorNickname, confirmTime: order.confirmTime, confirmerNickname: order.confirmerNickname, crmCustomerName: order.crmCustomerName, inspectionDepartmentName: order.inspectionDepartmentName, attendingDoctorName: order.attendingDoctorName })); } return result; }, ``` ```javascript // POST /create-order (body = JSON) async 'POST /create-order'(params, body) { if (!body) return { error: 'JSON body required' }; return await apiCall('POST', '/order/saveOrUpdateOrderAllData', body); }, // POST /update-order (body = JSON) async 'POST /update-order'(params, body) { if (!body) return { error: 'JSON body required' }; return await apiCall('POST', '/order/saveOrUpdateOrderAllData', body); }, // POST /complete-order/:id async 'POST /complete-order'(params) { const orderId = params.id; if (!orderId) return { error: 'order_ ...[truncated 2936 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/biolims.mjs:283
Finding

Sensitive Credentials, Session Tokens, and Medical Data May Be Transmitted over Plaintext HTTP

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/biolims.mjs:293
Finding

Predictable Shared Temporary Files Store Bio-LIMS Tokens and Cookies without Explicit Protection

Content
View full analysis
now) { return data; } } } catch (e) { // ignore } return null; } function saveTokenCache(auth) { try { fs.writeFileSync(TOKEN_CACHE_FILE, JSON.stringify(auth)); } catch (e) { // ignore } } ``` The stored object contains authentication material: ```javascript const auth = { token, xsrf, cookies: cookies.join('; '), expires_at: Math.floor(Date.now() / 1000) + 25 * 60 }; ``` The shell implementation similarly uses predictable paths: ```bash TOKEN_CACHE="/tmp/biolims_token_cache.json" COOKIE_JAR="/tmp/biolims_cookies.txt" ``` ```bash cat > "$TOKEN_CACHE" <
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/test_api.py:52
Finding

Diagnostic Scripts Disclose Password Ciphertext, Complete Tokens, Cookies, and Authorization Headers

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • System Prompt LeakageDirect Leakage, Indirect Extraction, Tool-Based Exfiltration
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
Findings (254)

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

If the underlying skill logs or exposes encrypted passwords, headers, cookies, or token responses as the finding states, that is a real security issue because it can leak reusable authentication artifacts for a medical/LIMS system. The skill context makes this more dangerous because compromise would affect sensitive patient, order, and laboratory data rather than low-risk content.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

If the underlying skill logs or exposes encrypted passwords, headers, cookies, or token responses as the finding states, that is a real security issue because it can leak reusable authentication artifacts for a medical/LIMS system. The skill context makes this more dangerous because compromise would affect sensitive patient, order, and laboratory data rather than low-risk content.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

If the underlying skill logs or exposes encrypted passwords, headers, cookies, or token responses as the finding states, that is a real security issue because it can leak reusable authentication artifacts for a medical/LIMS system. The skill context makes this more dangerous because compromise would affect sensitive patient, order, and laboratory data rather than low-risk content.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

If the underlying skill logs or exposes encrypted passwords, headers, cookies, or token responses as the finding states, that is a real security issue because it can leak reusable authentication artifacts for a medical/LIMS system. The skill context makes this more dangerous because compromise would affect sensitive patient, order, and laboratory data rather than low-risk content.

Content

No source excerpt is available for this finding.

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
A skill for calling Bio-LIMS backend APIs. All API calls are made through `scripts/biolims.mjs`, with automatic token management.

Ssd 3

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill explicitly instructs the agent to return detailed patient information, contact data, medical context, and order details. In a Bio-LIMS setting, this is highly sensitive regulated information, and broad disclosure to the requester without authorization checks or minimization can result in serious privacy breaches and compliance violations.

Content

No source excerpt is available for this finding.

Ssd 3

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

These list and sample-detail templates encourage bulk disclosure of multiple patients' names, barcodes, statuses, and related medical sample data in one response. Bulk extraction is especially dangerous because it enables high-volume privacy loss and operational data harvesting from a single prompt.

Content

No source excerpt is available for this finding.

Direct Prompt Extraction

High
Category
System Prompt Leakage
Confidence
85% confidence
Finding

Skill contains instructions that could directly expose system prompts, internal rules, or hidden instructions to users or external parties.

Content

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

  1. Format output
text

**Display Rules (Very Important):**
1. **Use English field display names**:
   - Strictly follow the field mapping table using English names
   - Example: `name` -> "Patient Name: John Smith"

Ssd 3

High
Category
Not specified by scanner
Confidence
96% confidence
Finding

The instructions tell the agent to parse and display arbitrary custom fields from customFieldValue, which creates an unbounded channel for exposing sensitive or unexpected data categories. Because custom fields can include free-form clinical notes or identifiers, this bypasses any fixed-field privacy review and significantly increases leakage risk.

Content

No source excerpt is available for this finding.

Ssd 3

High
Category
Not specified by scanner
Confidence
96% confidence
Finding

The receive-order scenarios direct disclosure of detailed patient names, genders, sample types, barcodes, order IDs, and logistics information. Combining medical sample data with shipping and workflow details materially increases the impact of exposure by enabling both privacy harms and operational reconnaissance.

Content

No source excerpt is available for this finding.

Ssd 3

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

This section instructs the agent to reveal complete receive-order and sample-item data, including custom fields, effectively maximizing disclosure rather than minimizing it. In a medical laboratory system, that creates a high-risk path for unauthorized extraction of PHI, operational metadata, and potentially free-text sensitive notes.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The direct /command arg1 arg2 mode forwards user-supplied command names and arguments into the Bio-LIMS backend wrapper with no allowlist or policy validation. Even if this does not immediately become shell injection in this file, it creates an arbitrary backend action surface that can expose administrative, destructive, or data-exfiltrating Bio-LIMS operations through a chat-facing API.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
95% confidence
Finding

These handlers call remote completeTask and cancelTask endpoints that can change order lifecycle state in ways that may be hard to reverse. The code has no confirmation mechanism and no explicit warning near the endpoint definitions or startup output that these HTTP routes trigger completion or cancellation actions on live orders.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The skill manifest materially understates the operational scope of the code. In addition to Bio-LIMS order/sample/template functions, the script exposes sequencing QC and report distribution workflows, including state transitions and report sending, which changes the trust boundary and can lead an invoking agent or user to perform actions they did not knowingly authorize.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The default BASE_URL uses plain HTTP, and the script performs login and authenticated API operations over that channel. This exposes credentials, session cookies, and bearer-style tokens to interception or modification by any attacker on the network path, which is especially dangerous in a Bio-LIMS context handling patient, sample, and order data.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
96% confidence
Finding

The script both transmits authentication material and emits sensitive session data to output without warning or redaction. Even if transmission is functionally required for login, exposing the resulting headers, cookies, and body content creates an avoidable disclosure channel that can compromise accounts or reveal backend data structures and identifiers.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The script prints the obtained API token directly to stdout, which can leak a reusable credential into terminal history, CI logs, centralized logging systems, or screenshots. Because this skill manages BioLIMS orders and sample data, a stolen token could enable unauthorized access to operational or potentially sensitive laboratory information.

Content

No source excerpt is available for this finding.

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
95% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · scripts/test_token_expiry.sh (reported line 18)May include surrounding context.

sh
# 2. Delete token and cookies to simulate expiry
echo "2. Delete token cache to simulate expiry"
rm -f /tmp/biolims_token_cache.json /tmp/biolims_cookies.txt
echo "   Cache deleted"
echo ""

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The documented command surface materially exceeds the manifest's scoped description by exposing a broad Experiment Center administrative interface with 83 endpoints. Scope drift is dangerous because downstream agents or users may invoke powerful actions they were not led to expect, reducing the effectiveness of consent, policy gating, and least-privilege review.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

Destructive commands such as deleting custom table data and deleting experiment data are presented as routine commands with no warning, safeguard, or mention of irreversible impact. In a Bio-LIMS context handling experiment and sample records, this increases the chance that an agent or operator will perform irreversible data loss or workflow corruption without informed consent.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The batch-write <file_path> '<json_data>' capability introduces local file-backed write/export behavior that is not disclosed in the manifest. Undocumented file I/O is especially risky in agent contexts because it can enable writing sensitive lab data to arbitrary paths, overwriting files, or creating unexpected artifacts outside the user's intent.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The README documents a broad set of Experiment Center operations, including creating experiments, saving step data, completing workflow steps, and modifying sample assignments, which extends beyond the manifest’s described scope of orders, receiving, barcode scanning, and template management. Scope drift is dangerous because it can cause users, operators, or upstream orchestration to invoke sensitive capabilities they did not expect the skill to possess, increasing the chance of unauthorized or unsafe laboratory data changes.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The documentation exposes numerous state-changing commands affecting laboratory workflows and sample records, such as create-experiment, experiment-save, complete-step, add/remove samples, and sample mixing, but gives no warning that these actions can irreversibly alter operational lab data. In a LIMS context, silent mutation of experiment state or sample lineage can cause data integrity loss, workflow corruption, and potentially patient-impacting downstream errors if an agent executes commands without explicit human confirmation.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The manifest says this skill manages orders, sample receiving, barcode scanning, and experiment templates, but this file documents a substantial additional sequencing QC module with QC order processing, QC detail deletion, import/export, workflow completion/recall, and external QC item updates. That is a semantic expansion of the skill’s described purpose rather than an obvious implementation detail of the listed manifest functions.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The documentation exposes a destructive delete operation for QC detail records without any warning, confirmation guidance, or mention of reversibility. In a conversational/agent-driven interface, this increases the chance of accidental or socially engineered record deletion affecting laboratory workflow integrity and traceability.

Content

No source excerpt is available for this finding.