T09 · Insecure Skill Coding Practices
- Location
SETUP.md:3- Finding
Instance-Specific Sharing Material Included in the Distributed Package
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This Anytype skill is mostly purpose-aligned, but it ships private instance setup details and encourages high-impact data changes that require careful review before installation.
Install only after removing SETUP.md or replacing it with placeholders, rotating or revoking the exposed Anytype invite/hash if they are real, and deciding whether the bot account's Anytype permissions are narrowly scoped. Store the API key in a safer secret store or a locked-down file outside shared workspace content, and require explicit user confirmation plus a recoverable backup before any delete or delete-and-recreate update.
SETUP.md:3Instance-Specific Sharing Material Included in the Distributed Package
SKILL.md:45API Bearer Credential Stored in a Shared Plaintext Environment File
SKILL.md:103Delete-Before-Recreate Update Workflow Can Cause Irrecoverable Data and Reference Loss
The skill instructs storing an API key in a plaintext .env file under a workspace path, which creates a durable credential exposure point. If the workspace is readable by other tools, users, logs, backups, or accidental commits, the key can be stolen and used to access or modify Anytype data.
anytype auth apikey create my-key
echo "ANYTYPE_API_KEY=" >> ~/.openclaw/workspace/.env
## API Usage
The code reads a bearer token directly from a workspace .env file, expanding the set of components and prompts that can access the credential. In agent environments, broad file-read capability can make plaintext token retrieval a practical credential theft path.
def load_api_key():
if "ANYTYPE_API_KEY" in os.environ:
return os.environ["ANYTYPE_API_KEY"]
env_path = os.path.expanduser("~/.openclaw/workspace/.env")
if os.path.exists(env_path):
for line in open(env_path):
if line.strip().startswith("ANYTYPE_API_KEY="):
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
BASE = "http://127.0.0.1:31012"
def load_api_key():
"""Read only ANYTYPE_API_KEY from the workspace .env — nothing else."""
if "ANYTYPE_API_KEY" in os.environ:
return os.environ["ANYTYPE_API_KEY"]
env_path = os.path.expanduser("~/.openclaw/workspace/.env")
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
"""Read only ANYTYPE_API_KEY from the workspace .env — nothing else."""
if "ANYTYPE_API_KEY" in os.environ:
return os.environ["ANYTYPE_API_KEY"]
env_path = os.path.expanduser("~/.openclaw/workspace/.env")
if os.path.exists(env_path):
with open(env_path) as f:
for line in f:
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
"""Read only ANYTYPE_API_KEY from the workspace .env — nothing else."""
if "ANYTYPE_API_KEY" in os.environ:
return os.environ["ANYTYPE_API_KEY"]
env_path = os.path.expanduser("~/.openclaw/workspace/.env")
if os.path.exists(env_path):
with open(env_path) as f:
for line in f:
The skill performs sensitive operations involving environment variables and HTTP requests, but it does not declare any explicit tool scope or permission boundaries. That increases the risk that an agent may invoke network and credential-handling behaviors without clear user visibility or policy enforcement.
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.
# 1. Create a dedicated bot account (generates a key, NOT mnemonic-based)
anytype auth create my-bot
# 2. Install and start as a user service
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
requests.delete(f"{BASE}/v1/spaces/{space_id}/objects/{old_id}", headers=headers)
# Step 2: create new object with full updated content
resp = requests.post(f"{BASE}/v1/spaces/{space_id}/objects",
json={"name": name, "type_key": "page", "body": new_content},
headers=headers)
new_id = resp.json()["object"]["id"]
The file documents bearer authentication and an endpoint that returns an API key, but does not include any caution about treating the key as sensitive credential material. For markdown files, omitting privacy or security warnings around credential-handling behavior is a reportable missing warning.
This markdown file lists create, update, and delete operations for spaces, including DELETE /v1/spaces/{space_id}, but does not warn that these actions can modify or permanently remove user data. Under the markdown-specific warning criterion, descriptions of behaviours affecting user data or system integrity should disclose those risks.
The Objects section includes create, update, and delete endpoints for user content, but provides no warning that these operations can alter or remove stored objects. Because this is a markdown description of data-affecting behavior, the omission leaves safety-relevant consequences undisclosed.
The instructions say to default to page for all content and frame note as a narrow exception, which imposes a fixed content-organization policy rather than offering a user choice. This is a natural-language constraint on user workflow/preferences and is not justified as a region- or compliance-specific requirement.
No suspicious patterns detected.