Back to skill

Security audit

Metagenomic Krona Chart

Security checks for vulnerabilities and agentic risk

Overview

The skill mostly matches its metagenomic charting purpose, but it needs review because the generated HTML loads external JavaScript despite offline/no-network claims and the Python dependencies are unpinned.

Install only in an isolated Python environment, prefer pinned reviewed versions of pandas and plotly, and treat generated charts as network-dependent unless the code is changed to embed Plotly locally. Use the skill only with intended metagenomic taxonomy report files and choose output paths carefully to avoid overwriting files.

Vulnerability Patterns
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (2)

T08 · Insecure Dependencies

Warning
Location
requirements.txt:1
Finding
Unpinned Third-Party Dependencies Create Supply-Chain Exposure<![CDATA[ ## Vulnerability Details **File Location**: `requirements.txt:1-2`; installation guidance also appears in `SKILL.md:164-166` **Vulnerability Type**: Unpinned third-party dependencies **Risk Level**: Medium ### Vulnerable Code `requirements.txt:1-2`: ```text pandas plotly ``` `SKILL.md:164-166`: ```text pip install plotly pandas ``` ### Technical Analysis The project installs `pandas` and `plotly` without exact versions or package hashes. Consequently, separate installations can resolve to different releases, including versions published after this project was audited. Python packages can execute code during installation and when imported. The application imports both dependencies near the beginning of `scripts/main.py`, so a malicious or compromised release could also execute with the privileges of the user running the chart generator. The package names are legitimate and there is no evidence that the currently available releases are malicious. The vulnerability is the absence of controls that ensure users install the exact dependency artifacts reviewed and tested by the project. ### Attack Path 1. An attacker compromises a future release, distribution account, package index, dependency source, or resolution path associated with one of the declared packages. 2. A user follows the documented installation command or runs `pip install -r requirements.txt`. 3. Because no versions or hashes are specified, pip accepts the attacker-controlled artifact if it satisfies normal resolution rules. 4. Malicious package code executes during installation or when `scripts/main.py` imports the dependency. 5. The code operates with the filesystem, network, and process privileges of the Python environment and user performing the installation or execution. ### Impact Assessment Successful exploitation could execute arbitrary Python code with the privileges of the installing or executing user. Depending on those privileges, this could expose accessible input da ...[truncated 325 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Pin each direct dependency to an explicitly reviewed version, for example: ```text pandas==<reviewed-version> plotly==<reviewed-version> ``` 2. Generate a lock file containing hashes for direct and transitive dependencies, and install with hash enforcement: ```bash python -m pip install --require-hashes -r requirements.lock ``` 3. Generate locked dependencies from a controlled package index and retain the lock file in source control. 4. Use an isolated virtual environment and avoid installing the project as a privileged or administrative user. 5. Add automated dependency vulnerability and integrity scanning to the release process. 6. Review and deliberately update dependency pins rather than allowing installations to resolve arbitrary future releases. ]]>

T03 · Remote Payload Retrieval and Execution

Warning
Location
scripts/main.py:329
Finding
Generated HTML Executes Mutable JavaScript Retrieved from a CDN<![CDATA[ ## Vulnerability Details **File Location**: `scripts/main.py:329` **Vulnerability Type**: Remote payload retrieval and execution **Risk Level**: Medium ### Vulnerable Code ```python # Save HTML fig.write_html(output_path, include_plotlyjs='cdn') print(f"Krona chart saved to: {output_path}") return True ``` ### Technical Analysis The `include_plotlyjs='cdn'` option causes the generated chart to reference Plotly JavaScript hosted by an external CDN rather than embedding the runtime in the HTML output. When a user opens the chart, the browser retrieves and executes that remote JavaScript. This makes the effective executable content mutable after the skill has been reviewed. Security therefore depends on the CDN, transport path, referenced release, and continued integrity of the remote resource. It also conflicts with the documentation claiming that output is standalone and can be viewed offline. The project itself does not explicitly download and execute the script during the Python process. Execution occurs in the browser when the generated artifact is opened. There is no evidence that Plotly's CDN currently serves malicious content; the risk arises from delegating executable content to an external, changeable source. ### Attack Path 1. A user runs `scripts/main.py`, producing an HTML chart containing a reference to Plotly's CDN-hosted JavaScript. 2. The user opens the generated file in a browser while connected to a network. 3. The browser requests the referenced JavaScript from the external CDN. 4. If the CDN account, hosted asset, DNS resolution, or another relevant delivery component is compromised, attacker-controlled JavaScript is returned. 5. The browser executes that JavaScript in the generated chart's document context. 6. The payload can alter the chart, display deceptive content, initiate further network requests, or access data available to that browser document, subject to browser-origin and local-file security restrictions. ### Impa ...[truncated 622 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Embed Plotly JavaScript directly in each generated document: ```python fig.write_html(output_path, include_plotlyjs=True) ``` This produces a genuinely standalone artifact and prevents runtime retrieval of mutable executable code. 2. Alternatively, package a reviewed, version-pinned Plotly JavaScript file locally and reference only that controlled copy. 3. If remote loading is retained, use a fixed reviewed version, Subresource Integrity where supported, and an appropriately restrictive Content Security Policy. 4. Update `README.md` and `SKILL.md` so network-access and offline-output claims accurately describe runtime behavior. 5. Rebuild generated artifacts after dependency updates so their embedded runtime remains aligned with the reviewed dependency version. ]]>
Vulnerability Patterns
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (9)

Tp4

High
Category
MCP Tool Poisoning
Confidence
88% confidence
Finding
The code’s core purpose does relate to metagenomic Krona-style chart generation, so the domain is aligned. However, the description overstates several important behaviors that are not implemented. There is no workflow engine or reproducibility framework, no substantial validation layer beyond simple parsing/error checks, and no structured analytical output such as JSON/report objects for downstream review. The actual behavior is a visualization generator, not a broader analysis workflow with explicit validation and structured review outputs.

Lp3

Medium
Category
MCP Least Privilege
Confidence
88% confidence
Finding
The skill documents executable behavior and file access patterns but does not declare any explicit tool scope such as allowed tools or permissions. This creates ambiguity for an agent runtime and can lead to broader-than-expected file access if the platform defaults are permissive, especially because the workflow encourages reading user-supplied files and writing outputs.

Vague Triggers

Medium
Confidence
89% confidence
Finding
The activation guidance is broad enough to encourage use for generic data-analysis tasks beyond Krona chart generation. In an agent setting, overscoped routing can cause the wrong skill to be selected for tasks involving unrelated data handling, increasing the chance of unsafe file processing, misleading outputs, or use outside validated assumptions.

Intent-Code Divergence

Medium
Confidence
91% confidence
Finding
The example invocation shows passing free-form clinical-style text via --input, while the skill documentation elsewhere says the tool generates Krona charts from TSV/classification report files for metagenomic data. This directly conflicts with the documented behavior and could mislead operators about acceptable inputs.

Missing User Warnings

Low
Confidence
76% confidence
Finding
The skill documentation shows output file generation via '-o krona_chart.html' and states that output is a standalone HTML file, but it does not clearly warn users that running the skill will create or potentially overwrite files at the specified path. For markdown-scoped warning checks, file-system effects that may affect user data should be disclosed plainly.

Intent-Code Divergence

Low
Confidence
95% confidence
Finding
The file states 'No additional Python packages required' at L188, but elsewhere explicitly declares pandas and plotly as dependencies and provides a pip install command at L140-L148. This is an active documentation contradiction about what is needed to run the skill.

Unpinned Dependencies

Low
Category
Supply Chain
Content
pandas
plotly
Confidence
97% confidence
Finding
The dependency manifest specifies pandas without a version pin, which makes builds non-reproducible and allows unexpected upstream releases to be installed later. While not an immediate exploit by itself, this increases supply-chain risk and can expose the skill to breaking or vulnerable versions over time.

Unverifiable Dependency: pandas has 1 known advisory(ies) (CVE-2020-13091 (** DISPUTED ** pandas through 1.0.3 can unserialize and execute commands from an)), but the manifest does not pin a version, so it is unknown whether the installed release is affected

Low
Category
Supply Chain
Confidence
90% confidence
Finding
The manifest includes pandas without a pinned version, and the scanner notes a known disputed advisory affecting some pandas releases. Because the version is not fixed, it is impossible to verify from this file whether an affected release could be installed, creating uncertainty around exposure and compounding the supply-chain risk.

Unpinned Dependencies

Low
Category
Supply Chain
Content
pandas
plotly
Confidence
97% confidence
Finding
The dependency manifest specifies plotly without a version pin, so future installations may resolve to different releases with different behavior or newly introduced vulnerabilities. This weakens reproducibility and increases software supply-chain exposure.

Static analysis

No suspicious patterns detected.