Back to skill

Security audit

3d Molecule Ray Tracer

Security checks for vulnerabilities and agentic risk

Overview

The skill is broadly about molecular rendering, but its script generator can write outside the workspace and can place unsanitized user input into executable PyMOL or ChimeraX command files.

Review before installing or using. Only run it with trusted, simple inputs, avoid absolute or traversal output paths, and inspect generated .pml or .cxc files before opening them in PyMOL or ChimeraX. The publisher should add strict input validation, target-specific quoting, extension checks, workspace-only output containment, and overwrite protection.

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

T09 · Insecure Skill Coding Practices

Error
Location
scripts/main.py:134
Finding

Unsanitized Input Embedded in Executable PyMOL and ChimeraX Scripts

Content
View full analysis
List[str]: """Generate structure loading commands.""" pdb = self.config['pdb'] lines = ["# Load structure"] # Check if PDB ID or file path if len(pdb) == 4 and pdb.isalnum() and not Path(pdb).exists(): lines.append(f"fetch {pdb}, async=0") else: lines.append(f"load {pdb}") lines.append("") return lines ``` PyMOL depth-of-field selection: ```python else: # Specific residue lines.extend([ f"# Focus on {dof_focus}", f"select dof_target, {dof_focus}", "center dof_target", "set dof_focus, 0", ]) ``` PyMOL output commands: ```python def _generate_raytrace(self) -> List[str]: """Generate ray tracing and output commands.""" resolution = self.config.get('resolution', 2400) output = self.config.get('output', 'output.png') # Change extension to .png if not already if not output.endswith('.png'): output = output.replace('.pml', '.png') return [ "# Ray tracing and output", f"set ray_trace_fog, 1", f"set ray_trace_frames, 0", f"ray {resolution}, {resolution}", f"png {output}, dpi=300", "", f'print("Rendering complete: {output}")', "", ] ``` ChimeraX structure loading: ```python def _generate_load(self) -> List[str]: """Generate structure loading commands.""" pdb = self.config['pdb'] lines = ["# Load structure"] if len(pdb) == 4 and pdb.isalnum() and not Path(pdb).exists(): lines.append(f"open {pdb}") else: lines.append(f"open {pdb}") lines.append("") return lines ``` ChimeraX selection and rendering: ```python dof_foc ...[truncated 3602 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/main.py:637
Finding

Unrestricted Output Path Allows Arbitrary File Overwrite

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • 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 (2)

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
90% confidence
Finding

The skill advertises capabilities that include writing rendering scripts to disk, but it does not declare any explicit tool scope such as permissions or allowed-tools. That mismatch weakens enforcement boundaries and can allow broader-than-expected file write behavior if the hosting agent infers capabilities from instructions rather than a restrictive manifest. In this context, the danger is moderated because the documented write action is limited to script output, but the absence of explicit scope is still a real security control gap.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

Line L110 contains Chinese text in an otherwise English skill document, which imposes a language choice without offering the user a language/locale option. The policy allows locale constraints only when clearly documented and justified, which is not present here.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.