Back to skill

Security audit

ClawBio Equity Scorer

Security checks for vulnerabilities and agentic risk

Overview

This local genomics reporting skill shows no exfiltration or persistence, but it needs Review because it can produce sensitive and potentially misleading ancestry/genetic reports without enough safeguards.

Install only if you are comfortable running a local genomics/ancestry analysis tool that writes persistent reports and tables. Use a private output directory, avoid shared machines for sensitive data, provide an explicit reviewed population map instead of relying on inferred labels, treat CSV-only HEIM scores as limited summaries, and avoid opening generated CSV/Markdown from untrusted labels with spreadsheet formulas or remote content enabled.

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 (2)

T08 · Insecure Dependencies

Warning
Location
SKILL.md:15
Finding
Unpinned Third-Party Dependencies Permit Supply-Chain Drift<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 15-30 **Vulnerability Type**: Unpinned dependency installation **Risk Level**: Medium ### Vulnerable Code ```yaml install: - kind: uv package: biopython bins: [] - kind: uv package: pandas bins: [] - kind: uv package: scikit-learn bins: [] - kind: uv package: matplotlib bins: [] - kind: uv package: numpy bins: [] ``` ### Technical Analysis The installation metadata requests five third-party packages without exact versions, integrity hashes, or a lockfile. Consequently, each installation may resolve to different package artifacts than those examined during this audit. Although the dependency section elsewhere in the documentation mentions minimum versions, those prose constraints are not enforced by the installation configuration. Even minimum-version constraints would not provide reproducible or integrity-verified installation. This creates a supply-chain exposure if a package registry account, package release, dependency resolution path, or transitive dependency is compromised. Python package installation may execute build backend code, while malicious runtime code may execute when the installed modules are imported. ### Attack Path 1. An attacker compromises a listed package or one of its transitive dependencies and publishes a malicious release. 2. A user installs the Skill using the declared `uv` installation entries. 3. Because no exact version or hash is specified, the resolver selects the malicious or otherwise unreviewed release. 4. Malicious logic executes during package building, installation, or later import by `equity_scorer.py`. 5. The code runs with the privileges and filesystem/network access of the user performing the installation or analysis. ### Impact Assessment Successful exploitation could execute arbitrary code under the installing or invoking user's account. The resulting access could include reading or modify ...[truncated 320 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Pin each direct dependency to a reviewed exact version, such as `numpy==<reviewed-version>`. 2. Generate and commit a lockfile that also fixes all transitive dependency versions. 3. Require cryptographic hashes for downloaded distributions and reject artifacts whose hashes do not match. 4. Prefer reviewed binary wheels from a trusted package index, and explicitly restrict the allowed package index. 5. Configure installation to reject unexpected source distributions where practical, reducing exposure to build-time code execution. 6. Use automated dependency vulnerability and provenance scanning in CI. 7. Periodically update dependencies through a controlled review process rather than resolving unrestricted current releases during installation. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
equity_scorer.py:657
Finding
Unescaped Population Labels Permit Markdown and Spreadsheet-Formula Injection<![CDATA[ ## Vulnerability Details **File Location**: `equity_scorer.py`, lines 657-663, 873-878, 925, 962-967, and 989 **Vulnerability Type**: Output injection through attacker-controlled population labels **Risk Level**: Medium ### Vulnerable Code Population labels are inserted directly into Markdown table rows: ```python pop_rows = [] for pop in sorted(pop_counts.keys()): count = pop_counts[pop] pct = count / total * 100 global_pct = GLOBAL_PROPORTIONS.get(pop.upper(), 0) * 100 ratio = pct / global_pct if global_pct > 0 else float("inf") o_het = obs_het.get(pop, 0) e_het = exp_het.get(pop, 0) pop_rows.append( "| %s | %d | %.1f%% | %.1f%% | %.2fx | %.4f | %.4f |" % (pop, count, pct, global_pct, ratio, o_het, e_het) ) ``` The resulting report is written without sanitization: ```python report_path = output_dir / "report.md" report_path.write_text(report) ``` Population labels are also written directly into CSV output in the VCF pipeline: ```python pd.DataFrame([ {"population": k, "count": v, "proportion": v / sum(pop_counts.values()), "obs_het": obs_het.get(k, 0), "exp_het": exp_het.get(k, 0)} for k, v in sorted(pop_counts.items()) ]).to_csv(tables_dir / "population_summary.csv", index=False) ``` The ancestry CSV pipeline has the same CSV output behavior: ```python pd.DataFrame([ {"population": k, "count": v, "proportion": v / sum(pop_counts.values())} for k, v in sorted(pop_counts.items()) ]).to_csv(tables_dir / "population_summary.csv", index=False) ``` ### Technical Analysis Population labels originate from user-supplied ancestry CSV data, population-map CSV data, or VCF sample-derived values. These labels are treated as trusted display values when constructing Markdown and CSV outputs. For Markdown reports, characters such as pipes, brackets, parentheses, newlines, and image syntax are not escaped. A crafted label can break the expected table structure and inject arbitrary Markd ...[truncated 2558 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Validate population labels against a strict allowlist where standardized population codes are expected, such as `AFR`, `AMR`, `EAS`, `EUR`, `SAS`, `OCE`, `MID`, and `UNKNOWN`. 2. If arbitrary labels must be supported, reject control characters and enforce reasonable length limits. 3. Escape Markdown-special characters before interpolation. At minimum, escape backslashes, pipes, brackets, parentheses, angle brackets, and line breaks according to the output context. 4. Treat Markdown links and image syntax as unsafe unless explicitly required. 5. Neutralize spreadsheet formulas before CSV export. Prefix text cells beginning with `=`, `+`, `-`, or `@` with a single quote or another documented safe character. 6. Apply CSV neutralization to every user-controlled text column, not only the population field. 7. Consider offering a non-formula data format such as JSON for machine-readable exports. 8. Add regression tests using labels containing Markdown table delimiters, newlines, links, image syntax, and each spreadsheet formula prefix. 9. Document that generated reports and tables contain data-derived labels and should be opened with remote-content loading and spreadsheet formula execution disabled. ]]>
Vulnerability Patterns
  • 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
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (5)

Lp3

Medium
Category
MCP Least Privilege
Confidence
89% confidence
Finding
The skill describes generating reports, figures, tables, and reproducibility artifacts on disk, which implies file-write behavior, but it does not declare any explicit tool scope or permissions restricting where writes may occur. In an agent framework, undeclared write capability increases the risk of unintended or overbroad filesystem modification, especially if output paths are influenced by user input or runtime context.

Missing User Warnings

Medium
Confidence
93% confidence
Finding
When no population map is provided, the tool infers ancestry labels from sample ID prefixes and then uses those inferred labels in scoring, plots, and persisted reports without warning users that the labels are guesses. In a genomics setting, this can propagate incorrect or stigmatizing ancestry assignments into durable artifacts and contaminate downstream analyses.

Intent-Code Divergence

Medium
Confidence
98% confidence
Finding
The implementation computes a Nei's GST-style estimator, but the generated report labels the result as Hudson FST. In this domain, metric mislabeling can mislead users about methodological validity, comparability to published work, and the meaning of reported population differentiation values.

Missing User Warnings

Medium
Confidence
88% confidence
Finding
The pipeline writes ancestry/genotype-derived summaries, plots, tables, and a markdown report to disk by default without an explicit privacy notice, consent checkpoint, or data-minimization controls. Because the skill processes sensitive human genetic and ancestry information, these outputs can create confidentiality and re-identification risks if stored in shared locations or retained longer than intended.

Description-Behavior Mismatch

Medium
Confidence
96% confidence
Finding
In CSV ancestry mode, the tool assigns hard-coded heterozygosity estimates and still produces a HEIM score and report that can be interpreted as if they were derived from real genetic variation data. In a genomics/equity-analysis context, this is dangerous because downstream users may make scientific, clinical, or policy decisions based on fabricated diversity metrics and an incomplete analysis lacking real FST/PCA computation.

Static analysis

No suspicious patterns detected.