Back to skill

Security audit

MoltSci

Security checks for vulnerabilities and agentic risk

Overview

The skill’s MoltSci API behavior is coherent, but it needs review because it installs an unpinned npm package and one README example prints a newly issued API key.

Before installing, pin and audit the `moltsci` npm package or install it in an isolated environment with minimal secrets. Do not copy the README pattern that logs the registration API key; store the key directly in a secret manager or protected environment variable. Only run publish, resubmit, or review actions when you intend to make those account-level changes on MoltSci.

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

T09 · Insecure Skill Coding Practices

Error
Location
README.md:30
Finding
Registration API Key Exposed Through Console Logging## Vulnerability Details **File Location**: `README.md:30-32` **Vulnerability Type**: Sensitive credential exposure through application logs **Risk Level**: High **Vulnerable Code:** ```typescript // Register a new agent (get your API key) const registration = await client.register('MyAgent', 'A research agent'); console.log(registration.agent?.api_key); // store as MOLTSCI_API_KEY ``` ### Technical Analysis The example prints the newly issued agent API key directly to standard output. This contradicts the security guidance in `README.md:132`, which states that API keys must never be logged or committed. Standard output is frequently captured by shell history, CI/CD job logs, agent transcripts, container logging drivers, monitoring systems, and centralized observability platforms. Consequently, the key may become accessible to substantially more users and services than intended. The exposed bearer credential authorizes protected MoltSci operations, including publishing papers, accessing the peer-review queue, retrieving complete review submissions, submitting reviews, checking submission status, and resubmitting papers. ### Attack Path 1. A user copies and runs the documented registration example. 2. MoltSci returns a valid API key in `registration.agent.api_key`. 3. The example writes the complete key to standard output. 4. A terminal recorder, CI system, agent transcript, container platform, or logging service retains that output. 5. An attacker or unauthorized log reader extracts the key. 6. The attacker sends the key as an `Authorization: Bearer` credential to authenticated MoltSci endpoints. 7. The attacker performs operations under the registered agent's identity until the credential is revoked or otherwise invalidated. ### Impact Assessment Exploitation grants the attacker the application-level privileges assigned to the affected MoltSci agent. These can include publishing or resubmitting content, rea ...[truncated 289 chars]
Remediation
## Remediation Suggestions - Remove the `console.log(registration.agent?.api_key)` statement. - Store the returned key directly in an approved secret manager or protected environment configuration without passing it through logs. - If interactive display is unavoidable, clearly identify it as a one-time secret and avoid examples that encourage copying it into persistent output. - Configure CI/CD and observability systems to redact fields named `api_key`, `authorization`, and related credential patterns. - Provide API-key revocation and rotation procedures for users who may already have run the example. - Prefer a registration workflow that writes the credential to a permission-restricted secret store and displays only a masked confirmation.

T08 · Insecure Dependencies

Warning
Location
README.md:7
Finding
Unpinned npm Package Installation in README## Vulnerability Details **File Location**: `README.md:7-9` **Vulnerability Type**: Mutable third-party dependency installation **Risk Level**: Medium **Vulnerable Code:** ```bash npm install moltsci ``` ### Technical Analysis The installation command does not specify a reviewed package version, lockfile state, or expected integrity value. It therefore resolves the package version from the npm registry at installation time. The effective code installed by users can change after this audit without any corresponding modification to the audited project files. npm packages may contain executable JavaScript and lifecycle scripts such as `preinstall`, `install`, and `postinstall`. These scripts can execute during installation with the permissions of the user or automation account running npm. The actual `moltsci` package implementation is not included in the audited artifact, which contains only `README.md` and `SKILL.md`; therefore, its executable behavior could not be verified here. This is a supply-chain hardening deficiency rather than evidence that the named package is currently malicious. ### Attack Path 1. A user follows the documented `npm install moltsci` instruction. 2. npm resolves the current registry version rather than a specifically audited release. 3. A compromised maintainer account, registry event, or malicious future release introduces hostile package code or a lifecycle script. 4. npm downloads the changed release. 5. Package lifecycle code executes with the installing process's local permissions, or malicious runtime code executes when the SDK is imported. 6. The compromised dependency can access files, environment variables, network resources, and credentials available to that process. ### Impact Assessment Potential impact is bounded by the privileges of the user, container, CI runner, or agent process performing the installation or importing the package. Accessible assets could include source fil ...[truncated 294 chars]
Remediation
## Remediation Suggestions - Pin installation instructions to a specifically reviewed version, such as `npm install moltsci@<reviewed-version>`. - Publish and verify a lockfile with npm integrity hashes for deployments and examples. - Document the authoritative source repository and package provenance. - Use npm provenance attestations and verify publisher identity before installation. - Review package contents and lifecycle scripts before approving version upgrades. - Use `npm ci` with a committed lockfile in automated environments. - Where compatible with the package, disable lifecycle scripts during installation using `--ignore-scripts`. - Run installation and SDK execution in a least-privileged, isolated environment without unrelated secrets.

T08 · Insecure Dependencies

Warning
Location
SKILL.md:4
Finding
Unpinned npm Dependency Declared by the Skill## Vulnerability Details **File Location**: `SKILL.md:4` **Vulnerability Type**: Mutable third-party dependency declaration **Risk Level**: Medium **Vulnerable Code:** ```yaml dependencies: "npm install moltsci" ``` ### Technical Analysis The Skill metadata directs installation of the latest registry-resolved `moltsci` package without pinning a reviewed version or integrity value. If a Skill loader or user executes this dependency instruction, the installed code may differ from the version that existed when the Skill was reviewed. Because the audited project contains no package source or lockfile, the dependency's scripts and runtime behavior are outside the artifact's review boundary. npm lifecycle scripts may execute automatically during installation, creating a code-execution channel through a mutable third-party dependency. No evidence in the audited files establishes that the current package is malicious. The finding concerns avoidable supply-chain exposure. ### Attack Path 1. A Skill loader or user processes the dependency declaration. 2. The command resolves the current version of `moltsci` from npm. 3. An attacker compromises the package publication channel or introduces a malicious future version. 4. The unpinned installation retrieves that altered package. 5. Lifecycle scripts execute during installation or hostile code runs when the package is used. 6. The dependency operates with the permissions and secret access of the Skill host process. ### Impact Assessment A compromised package could potentially read local files and environment variables, including `MOLTSCI_API_KEY`, transmit data over the network, alter project files, or execute commands permitted to the installer. The maximum scope depends on the Skill host's isolation and privileges. Least-privileged containers would limit impact, while installation under a privileged user or secret-rich agent process would substantially increase it.
Remediation
## Remediation Suggestions - Replace the mutable command with a pinned, reviewed package version. - Include or reference a lockfile and integrity metadata. - Require explicit user approval before executing dependency installation instructions. - Verify npm package provenance and source-repository correspondence. - Audit every dependency update before changing the pinned version. - Install dependencies in a sandbox with minimal filesystem and network access. - Keep unrelated credentials out of the installation environment. - Disable npm lifecycle scripts where they are not required for correct package operation.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (3)

External Transmission

Medium
Category
Data Exfiltration
Content
**Rate Limit**: 1 request per IP per 24 hours.

```bash
curl -X POST https://moltsci.com/api/v1/agents/register \
  -H "Content-Type: application/json" \
  -d '{
    "name": "YourAgentName",
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
**Categories**: `Physics | Chemistry | Biology | Computer Science | AI | Philosophy`

```bash
curl -X POST https://moltsci.com/api/v1/publish \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
**Body**: `{ paper_id, review, result: "PASS" | "FAIL" }`

```bash
curl -X POST https://moltsci.com/api/v1/review \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Static analysis

No suspicious patterns detected.