Back to skill

Security audit

Pharmaclaw Catalyst Design

Security checks for vulnerabilities and agentic risk

Overview

This chemistry skill runs local catalyst and ligand-design scripts, with some rough edges around broad triggers and optional file outputs, but no hidden data access, network execution, persistence, or destructive behavior was found.

Install only in a controlled Python environment with RDKit supplied from a trusted, pinned source. Use explicit output directories, do not pass untrusted file paths, and treat catalyst and ligand suggestions as decision-support requiring expert chemistry review, especially if connected to other automated agents.

Vulnerability Patterns
  • 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
  • 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)

T08 · Insecure Dependencies

Warning
Location
scripts/ligand_designer.py:21
Finding

Unpinned Third-Party Dependency Installation Guidance

Content
View full analysis

Vulnerability Details

File Location: scripts/ligand_designer.py, lines 21-27
Vulnerability Type: Unpinned third-party dependency and unsafe installation guidance
Risk Level: Medium

Vulnerable Code

python
try:
    from rdkit import Chem
    from rdkit.Chem import AllChem, Descriptors, Draw, rdMolDescriptors, rdmolops
    from rdkit.Chem import RWMol
except ImportError:
    print(json.dumps({"error": "RDKit not installed. Run: pip install rdkit", "status": "error"}))
    sys.exit(1)

Technical Analysis

When RDKit is unavailable, the application recommends installing it with pip install rdkit. This command does not pin a reviewed package version, verify artifact hashes, require a lockfile, or constrain resolution to a documented trusted package source.

The application does not execute this command automatically, so exploitation requires a user or an automation agent to follow the emitted guidance. If followed, pip resolves the package and its transitive dependencies according to the mutable state of the configured package index. A compromised package release, dependency, package-index mirror, or local pip configuration could consequently introduce attacker-controlled code.

Python packages can execute code during installation and subsequently during import. The absence of version and integrity constraints therefore exposes the installation workflow to supply-chain compromise.

Attack Path

  1. RDKit is absent from the runtime environment.
  2. The user or automation agent invokes ligand_designer.py.
  3. The script emits the recommendation pip install rdkit.
  4. The user or agent executes that command without adding version, hash, or trusted-source restrictions.
  5. Pip resolves artifacts from its configured package index or mirror.
  6. An attacker who has compromised a resolved package, dependency, release, or configured index supplies a malicious artifact.
  7. Malicious code executes during package installation or when the ...[truncated 1053 chars]
Remediation
View remediation

Remediation Suggestions

  1. Declare RDKit in a reviewed dependency manifest rather than presenting an unconstrained installation command.
  2. Pin RDKit and all transitive dependencies to approved versions.
  3. Use a lockfile or hash-verified requirements file, such as installation with pip --require-hashes.
  4. Document and enforce an approved package index or internal artifact repository.
  5. Verify downloaded package provenance and integrity before deployment.
  6. Replace the current message with guidance referencing the controlled installation procedure, for example:
python
except ImportError:
    print(json.dumps({
        "error": "RDKit is not installed. Install dependencies from the project's reviewed, hash-locked requirements file.",
        "status": "error"
    }))
    sys.exit(1)
  1. Perform dependency vulnerability and provenance scanning in CI, and update pinned versions through a reviewed change-management process.
  2. Run dependency installation and the Skill under a least-privileged account in an isolated virtual environment or container.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • 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
Findings (8)

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

The declared behavior materially overstates what the skill actually does, including claims about RDKit-based ligand design, chaining from retrosynthesis, and downstream IP expansion. This mismatch is dangerous because other agents or users may rely on outputs as if they were generated by richer validated workflows, enabling unsafe automation decisions, false trust, and incorrect scientific or legal downstream actions.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
83% confidence
Finding

The skill advertises executable workflows that can write files (for example, saving JSON output or generating PNGs) but does not declare any tool scope or permissions boundaries. That makes its effective capabilities opaque to the host system and increases the risk of unintended file creation or overwrite if the skill is invoked automatically or with attacker-influenced arguments.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The trigger list includes very broad chemistry terms such as catalyst, ligand, phosphine, and reaction conditions, which can cause the skill to activate in many unrelated contexts. In a chemistry and drug-synthesis setting, over-broad invocation is more dangerous because it may insert synthesis-oriented recommendations into workflows that did not intend to call this skill, increasing the chance of unintended assistance for sensitive chemical work.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The chain entry advertises the downstream 'pharmacology' agent whenever a catalyst recommendation is produced, even though this skill is scoped to catalyst selection and ligand design. In an agent-chaining environment, this creates a scope-escalation path where chemistry inputs can be automatically routed into a biomedical/pharmacology workflow without clear user intent, increasing the chance of inappropriate cross-domain processing or unsafe capability composition.

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.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The script accepts an arbitrary --output path and writes JSON there, and when drawing is enabled it also writes an image either adjacent to that path or to a fixed /tmp location. In an agent setting, this creates filesystem side effects outside the stated core function and can overwrite files or place attacker-influenced content in sensitive or unexpected locations if downstream components pass untrusted paths.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

The manifest and module docstring emphasize designing novel ligand variants via RDKit, yet the bioisosteric branch returns non-constructed suggestions with null properties instead of designed molecules. This is a semantic mismatch between claimed behavior and what this code path actually performs.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
86% confidence
Finding

The code writes output files without warning the user or checking whether the destination already exists, which can lead to accidental overwrites of local data. In isolation this is a safety/usability flaw, but in automated agent workflows it can become a minor integrity issue because file creation happens silently and may clobber prior artifacts.

Content

No source excerpt is available for this finding.