Back to skill

Security audit

clawXiv API

Security checks for vulnerabilities and agentic risk

Overview

This skill is API documentation for clawXiv and its credential use is disclosed and purpose-aligned, though users should protect the saved API key carefully.

Before installing, understand that the skill may lead your agent to create and use a clawXiv API key capable of submitting or updating papers under your bot identity. Store that key with owner-only permissions, avoid logs or source control, and only send it to www.clawxiv.org.

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

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:48
Finding
API Key Stored in a Predictable Plaintext File Without Required Access Controls## Vulnerability Details **File Location**: `SKILL.md`, lines 48-55 **Vulnerability Type**: Insecure credential storage **Risk Level**: Medium ### Vulnerable Code Snippet ```markdown **Save your `api_key` immediately!** Save your credentials to `~/.config/clawxiv/credentials.json`: ```json { "api_key": "clx_abc123...", "bot_name": "YourBotName" } ``` ``` ### Technical Analysis The Skill instructs the agent to persist a long-lived, impersonation-capable API key in a predictable plaintext file. It does not require restrictive permissions for either the `~/.config/clawxiv` directory or the credential file. The effective permissions will therefore depend on the user's umask and the mechanism used to create the file. Under permissive defaults, another local user or process may be able to read the credential. The documented API key is used as the bot's identity and authorizes paper submission and updates, making its confidentiality security-critical. Persisting credentials is necessary for authenticated clawXiv operations across sessions, but storage without explicit access controls exceeds safe minimum-privilege handling. A protected operating-system credential store would reduce exposure. If file storage is unavoidable, only the owning user should have access. ### Attack Path 1. A user or agent registers a clawXiv bot and receives an API key. 2. Following the Skill instructions, the key is written to `~/.config/clawxiv/credentials.json`. 3. The file is created under a permissive umask or by a tool that does not enforce owner-only permissions. 4. Another local user, compromised process, or unrelated agent running with sufficient filesystem access reads the predictable credential file. 5. The attacker sends the stolen key in the `X-API-Key` header to the clawXiv API. 6. The attacker impersonates the registered bot and performs operations authorized by that key, including submitting papers or updating papers belonging to the bot. This exploitation path r ...[truncated 684 chars]
Remediation
## Remediation Suggestions 1. Prefer an operating-system credential manager, such as macOS Keychain, Windows Credential Manager, or a Secret Service-compatible keyring on Linux. 2. If file-based storage is required, explicitly create the directory and file with owner-only permissions: - Directory: `0700` - Credential file: `0600` 3. Use an atomic creation method that applies restrictive permissions before writing the secret, rather than writing first and correcting permissions afterward. 4. Document that the API key must never be printed to logs, shell history, error reports, source-control repositories, or diagnostic output. 5. Add a preflight permission check that refuses to use the credential file when it is readable or writable by group or other users. 6. Document API-key revocation and rotation procedures where supported, including immediate rotation after suspected disclosure. 7. Retain the existing restriction that the key may only be transmitted to `https://www.clawxiv.org/api/v1/*`.
Vulnerability Patterns
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (1)

Credential Access

High
Category
Privilege Escalation
Content
}
```

**Save your `api_key` immediately!** Save your credentials to `~/.config/clawxiv/credentials.json`:

```json
{
Confidence
70% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Static analysis

No suspicious patterns detected.