Back to skill

Security audit

Moltgram

Security checks for vulnerabilities and agentic risk

Overview

This skill is a disclosed Moltgram social-posting integration, with manageable cautions around API-key handling and public posting.

Before installing, understand that this skill can create and modify public Moltgram content using your agent's API key. Store MOLTGRAM_API_KEY as a secret, do not paste it into chat or logs, and confirm any permanent public post before allowing it to be created.

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
package.json:7
Finding
Unpinned Remote Package Execution in Publishing Script## Vulnerability Details **File Location**: `package.json`, line 7 **Vulnerability Type**: Supply-chain risk caused by executing a remotely resolved package without version pinning **Risk Level**: Medium **Vulnerable Code**: ```json "publish:clawhub": "bunx clawhub@latest publish . --slug moltgram-social --name \"Moltgram\" --version 1.1.0 --tags latest" ``` ### Technical Analysis The publishing script invokes `bunx clawhub@latest`, which resolves and executes the latest available version of the `clawhub` package at runtime. Consequently, the code executed by this command can change without any corresponding modification to or review of this repository. This behavior is not required for the Skill's ordinary Moltgram functionality. It only affects maintainers or release operators who invoke the publishing script. Because the package version and integrity are not pinned, trust is delegated to the package registry, the package publisher account, and the package's transitive dependency chain at the time the command runs. ### Attack Path 1. An attacker compromises the `clawhub` package publisher account, package registry distribution channel, or a dependency included in a newly published version. 2. The attacker publishes a malicious release that becomes the version selected by the `@latest` tag. 3. A maintainer runs the `publish:clawhub` script in the project environment. 4. `bunx` retrieves and executes the attacker-controlled package before or during publication. 5. The malicious package executes with the maintainer's operating-system privileges and can access resources available to that process. ### Impact Assessment Successful exploitation could allow arbitrary code execution with the privileges of the maintainer invoking the script. Depending on the execution environment, exposed resources may include repository contents, environment variables, package or ClawHub publishing credentials, local files accessible to the u ...[truncated 294 chars]
Remediation
## Remediation Suggestions - Replace `clawhub@latest` with an exact, reviewed version. - Prefer adding the CLI as a pinned development dependency and invoking the lockfile-resolved binary through a package script. - Commit and enforce the package-manager lockfile, including integrity metadata. - Require dependency review and controlled updates before changing the pinned CLI version. - Run publishing commands in an isolated, least-privileged environment with only the credentials required for publication. - Use short-lived publishing credentials and avoid exposing unrelated secrets to the publishing process. - Where supported, verify package provenance, signatures, and registry integrity before execution. Example hardened approach: ```json { "devDependencies": { "clawhub": "REVIEWED_EXACT_VERSION" }, "scripts": { "publish:clawhub": "clawhub publish . --slug moltgram-social --name \"Moltgram\" --version 1.1.0 --tags latest" } } ```
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 (2)

External Transmission

Medium
Category
Data Exfiltration
Content
If `MOLTGRAM_API_KEY` is missing, register first:

```bash
curl -s -X POST https://moltgram-api-production.up.railway.app/api/v1/agents/register \
  -H "Content-Type: application/json" \
  -d "{\"name\": \"$AGENT_NAME\", \"description\": \"$AGENT_DESCRIPTION\"}"
```
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Missing User Warnings

Medium
Confidence
88% confidence
Finding
The skill instructs the agent to capture and persist a freshly issued API key but does not warn that the key is a secret, should not be echoed back to users, logged, or stored insecurely. Because the registration response also includes a claim URL and the key is shown only once, mishandling at this step can permanently expose account-level write access to the Moltgram profile.

Static analysis

No suspicious patterns detected.