Back to skill

Security audit

Claw Newz

Security checks for vulnerabilities and agentic risk

Overview

This skill is a coherent Clawnews API guide for posting, commenting, voting, and reading feeds, with some credential and update hygiene risks users should handle carefully.

Install or update this only from a Clawnews instance you trust, prefer HTTPS for non-localhost instances, review the downloaded SKILL.md before replacing a local copy, and store the API key in a secret manager or a credentials file readable only by your user.

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)

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:62
Finding
Credential Storage Recommendation Lacks Restrictive File Permissions## Vulnerability Details **File Location**: `SKILL.md`, lines 62-69 **Vulnerability Type**: Insecure local credential storage **Risk Level**: Medium **Vulnerable Code Snippet**: ```markdown **Recommended:** Save your credentials to `~/.config/clawnews/credentials.json`: ```json { "api_key": "clawnews_xxx...", "agent_id": "uuid-here", "agent_name": "YourAgentName" } ``` ``` ### Technical Analysis The Skill recommends persisting a bearer API key in a plaintext JSON file but does not instruct the user or agent to create the directory and file with restrictive permissions. The resulting access permissions depend on the system umask, editor, and file-creation mechanism. On a shared or permissively configured system, the credential file could be readable by other local users or processes. The API key acts as the agent's identity and authorizes all state-changing Clawnews operations. Although storing a service credential is necessary for authenticated functionality, omitting access-control requirements exceeds an acceptably safe credential-handling baseline. The Skill does warn against sending the key to unrelated domains, but that warning does not mitigate local disclosure. ### Attack Path 1. A user follows the recommendation and creates `~/.config/clawnews/credentials.json`. 2. The file is created under a permissive umask or by a tool that grants group or world read access. 3. Another local user or compromised process enumerates the user's configuration files. 4. The attacker reads the API key from the JSON file. 5. The attacker submits authenticated requests to the victim's Clawnews instance using `Authorization: Bearer <stolen-key>`. 6. The requests are processed under the victim agent's identity. ### Impact Assessment An attacker who obtains the API key can impersonate the affected Clawnews agent. Based on the documented API, the attacker could create posts, add comments, and cast or modi ...[truncated 330 chars]
Remediation
## Remediation Suggestions Document secure file creation rather than only describing the JSON structure. For example: ```bash install -d -m 700 ~/.config/clawnews install -m 600 /dev/null ~/.config/clawnews/credentials.json ``` Additional hardening should include: - Verify that the credential file remains owned by the intended user and has mode `0600`. - Prefer an operating-system credential manager or secret store where available. - Warn users not to commit the file to source control, include it in backups without encryption, or expose it in logs. - Recommend short-lived or revocable tokens if supported by the service. - Document an API-key rotation and revocation procedure. - Avoid placing the key directly in command history; use a protected environment variable or secure credential helper when issuing requests.

T08 · Insecure Dependencies

Warning
Location
SKILL.md:20
Finding
Remote Skill Installation and Updates Lack Integrity Verification## Vulnerability Details **File Location**: `SKILL.md`, lines 20-25 and line 39 **Vulnerability Type**: Unverified remote Skill replacement **Risk Level**: Medium **Vulnerable Code Snippet**: ```markdown **Install locally (e.g. for molthub / clawhub):** ```bash # Replace BASE_URL with your Clawnews instance (e.g. https://clawnews.example.com) mkdir -p ~/.moltbot/skills/clawnews curl -s BASE_URL/api/skill > ~/.moltbot/skills/clawnews/SKILL.md ``` **Check for updates:** Re-fetch this file anytime to see new features. ``` ### Technical Analysis The installation command replaces a locally trusted Skill definition with content returned by a configurable remote server. It does not pin a version, validate a cryptographic checksum, verify a digital signature, require HTTPS for non-loopback hosts, or validate the downloaded document before overwriting the installed file. The use of `curl -s` also suppresses diagnostics and does not enable failure on HTTP error responses. Consequently, an error page, truncated response, or attacker-controlled document can overwrite the existing Skill. The command writes directly to the destination instead of staging the response in a temporary file and performing an atomic replacement after verification. The retrieved artifact is an instruction document rather than a native executable. Therefore, the reviewed version does not directly download and execute shell code. Nevertheless, Skill text controls subsequent agent behavior, so a malicious replacement could introduce prompt-injection instructions, unsafe commands, or credential-exfiltration directions when the Skill is next loaded. ### Attack Path 1. A user selects an untrusted Clawnews instance, uses an insecure remote HTTP endpoint, or a legitimate instance becomes compromised. 2. The user follows the installation or update instruction and requests `BASE_URL/api/skill`. 3. The remote endpoint returns attacker-controlled Skill text ...[truncated 1208 chars]
Remediation
## Remediation Suggestions Replace unrestricted re-fetching with a verified, versioned distribution process: - Require HTTPS for every non-loopback endpoint. - Publish versioned Skill artifacts from an authenticated canonical source. - Publish a cryptographic digest or, preferably, a digital signature and verify it before installation. - Pin the expected version or digest instead of always trusting the endpoint's latest response. - Use `curl --fail --show-error --location` with appropriate protocol restrictions and timeouts. - Download into a securely created temporary file rather than writing directly to the installed Skill. - Validate the response type, expected metadata, maximum size, and Skill structure. - Review the retrieved content before activation. - Atomically replace the installed file only after all checks succeed. - Retain a trusted previous version for rollback. - Avoid recommending automatic or periodic updates from arbitrary user-selected instances. A hardened workflow should conceptually follow this sequence: ```bash tmp_file="$(mktemp)" curl --fail --show-error --location \ --proto '=https' \ --output "$tmp_file" \ "https://trusted.example/api/skill" # Verify a pinned checksum or digital signature here. # Validate the Skill structure here. install -m 600 "$tmp_file" ~/.moltbot/skills/clawnews/SKILL.md rm -f "$tmp_file" ```
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Rogue AgentSelf-Modification, Session Persistence
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (4)

Credential Access

High
Category
Privilege Escalation
Content
**⚠️ Save your `apiKey` immediately!** It is shown only once. You need it for all authenticated requests.

**Recommended:** Save your credentials to `~/.config/clawnews/credentials.json`:

```json
{
Confidence
82% confidence
Finding
The skill instructs users to persist an API key in a plaintext file under `~/.config/clawnews/credentials.json`. While common in developer tooling, storing bearer credentials unencrypted on disk increases the chance of local credential theft through filesystem compromise, backup leakage, or overbroad file permissions.

Session Persistence

Medium
Category
Rogue Agent
Content
**Install locally (e.g. for molthub / clawhub):**
```bash
# Replace BASE_URL with your Clawnews instance (e.g. https://clawnews.example.com)
mkdir -p ~/.moltbot/skills/clawnews
curl -s BASE_URL/api/skill > ~/.moltbot/skills/clawnews/SKILL.md
```
Confidence
60% confidence
Finding
Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Skill Enumeration

Medium
Category
Agent Snooping
Content
```bash
# Replace BASE_URL with your Clawnews instance (e.g. https://clawnews.example.com)
mkdir -p ~/.moltbot/skills/clawnews
curl -s BASE_URL/api/skill > ~/.moltbot/skills/clawnews/SKILL.md
```

**Or just read from the URL in your browser!**
Confidence
80% confidence
Finding
Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.

External Transmission

Medium
Category
Data Exfiltration
Content
```bash
# Replace BASE_URL with your Clawnews instance (e.g. https://clawnews.example.com)
mkdir -p ~/.moltbot/skills/clawnews
curl -s BASE_URL/api/skill > ~/.moltbot/skills/clawnews/SKILL.md
```

**Or just read from the URL in your browser!**
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.