T09 · Insecure Skill Coding Practices
- Location
scripts/omi-cli.sh:5- Finding
Bearer Token Disclosure Through API Endpoint Variable Confusion
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This skill is a plausible Omi.me integration, but its shell scripts handle API tokens and request destinations unsafely enough that users should review it before installing.
Install only if you are comfortable reviewing or fixing the shell scripts first. At minimum, replace API_URL with OMI_API_URL, avoid printing the token, set ~/.config/omi-me to 700 and the token file to 600 on every write path, and treat delete/sync commands as sensitive operations over your Omi.me memories, tasks, and conversations.
scripts/omi-cli.sh:5Bearer Token Disclosure Through API Endpoint Variable Confusion
scripts/setup.sh:12Environment-Sourced API Token May Be Stored with World-Readable Permissions
scripts/omi-cli.sh:83Jq Program Injection Through Search Queries
scripts/omi-cli.sh:65Unsafe JSON Construction Allows Request-Body Injection
The documentation and detected behavior are inconsistent, especially around credential-file access and additional operations like search and message posting. When a skill's declared purpose does not fully describe its actual capabilities, users and policy engines may underestimate what data it can access or modify.
The documentation and detected behavior are inconsistent, especially around credential-file access and additional operations like search and message posting. When a skill's declared purpose does not fully describe its actual capabilities, users and policy engines may underestimate what data it can access or modify.
The skill documents shell-based setup and operational commands but does not declare any explicit tool scope or permissions. In an agent environment, undeclared shell capability increases the chance that the skill can perform filesystem changes, token handling, and network actions without clear user or platform review.
The skill intentionally persists authentication material and command symlinks under the user's home directory, creating durable state beyond a single session. Persistence is expected for integrations, but it still expands the blast radius if the host or account is later compromised.
The setup script will:
1. Create config directory `~/.config/omi-me/`
2. Guide you to configure your API token
3. Create symlinks for `omi` and `omi-token` commands
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
echo "omi_dev_your_token_here" > ~/.config/omi-me/token chmod 600 ~/.config/omi-me/token
### Get API Token
Documenting a command that prints the current API token encourages direct secret disclosure to terminal history, logs, screenshots, or agent outputs. In an agent setting, a tool that emits raw credentials can easily leak them across conversation context or telemetry.
The documentation includes memory deletion commands without warning that the operation is destructive and may be irreversible. Because this skill manages user memories, accidental invocation could cause permanent loss of high-value personal data.
Task deletion is presented as a normal command with no caution about irreversible removal. This can lead to accidental loss of action items or workflow state, especially when operated by an autonomous agent.
Conversation deletion is sensitive because it can erase communication history and context, yet the documentation gives no warning. In collaborative or memory-centric systems, such loss may be permanent and materially harmful.
Sync commands transfer memories, tasks, and conversations to or from a remote service, but the documentation omits privacy and data-handling warnings. Users may not realize that sensitive personal or organizational content is being transmitted and potentially persisted externally.
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.
omi memories list
**Create a memory:**
```bash
omi memories create "Caio prefers working in English" --type preference
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
# Load environment variables from default locations
export OMI_API_TOKEN="${OMI_API_TOKEN:-$(cat ~/.config/omi-me/token 2>/dev/null)}"
export OMI_API_URL="${OMI_API_URL:-https://api.omi.me/v1/dev}"
if [ -z "$OMI_API_TOKEN" ]; then
echo "Error: OMI_API_TOKEN not set."
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
# Load environment variables from default locations
export OMI_API_TOKEN="${OMI_API_TOKEN:-$(cat ~/.config/omi-me/token 2>/dev/null)}"
export OMI_API_URL="${OMI_API_URL:-https://api.omi.me/v1/dev}"
if [ -z "$OMI_API_TOKEN" ]; then
echo "Error: OMI_API_TOKEN not set."
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
# Load environment variables from default locations
export OMI_API_TOKEN="${OMI_API_TOKEN:-$(cat ~/.config/omi-me/token 2>/dev/null)}"
export OMI_API_URL="${OMI_API_URL:-https://api.omi.me/v1/dev}"
if [ -z "$OMI_API_TOKEN" ]; then
echo "Error: OMI_API_TOKEN not set."
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
# Load environment variables from default locations
export OMI_API_TOKEN="${OMI_API_TOKEN:-$(cat ~/.config/omi-me/token 2>/dev/null)}"
export OMI_API_URL="${OMI_API_URL:-https://api.omi.me/v1/dev}"
if [ -z "$OMI_API_TOKEN" ]; then
echo "Error: OMI_API_TOKEN not set."
The script documents and exports OMI_API_URL, but the actual HTTP requests use API_URL instead. This mismatch can silently send authenticated requests to an unintended endpoint if API_URL is set in the environment, or fail unpredictably while giving users a false sense of control over where sensitive data is sent.
This function transmits user data and a bearer token to an external service via curl. In this skill context that behavior is expected, but it becomes security-relevant because the destination URL handling is flawed, so the token and memory/task/conversation contents could be sent to an attacker-controlled endpoint if API_URL is injected.
local endpoint="$2"
local data="$3"
curl -s -X "$method" \
-H "Authorization: Bearer $OMI_API_TOKEN" \
-H "Content-Type: application/json" \
"${API_URL}/$endpoint" \
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.
echo " 🧠 Memories:"
echo " omi memories list"
echo " omi memories get <id>"
echo " omi memories create \"content\" [--type <type>]"
echo " omi memories update <id> \"new content\""
echo " omi memories delete <id>"
echo " omi memories search \"query\""
The get command prints the raw API token directly to stdout, which can leak credentials into terminal scrollback, shell history via command substitution, logs, or calling processes. A token-management helper for an integration does not need to expose the secret in plaintext to function, so this creates unnecessary credential disclosure risk.
Exposing the stored API token in plaintext without any warning makes accidental disclosure much more likely during normal use. Any local user, wrapper script, plugin, or log collector that captures stdout can obtain a bearer token and use it to access the user's Omi.me data.
The script stores the API token unencrypted on disk in a predictable location under the user's home directory. Although chmod 600 limits file access, plaintext storage still exposes the token to local compromise, backups, malware running as the user, or accidental disclosure, and the script does not warn the user about this tradeoff.
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
fi
echo "$TOKEN" > "$TOKEN_FILE"
chmod 600 "$TOKEN_FILE"
echo "✓ Token saved to $TOKEN_FILE"
echo ""
echo "Test your connection with: omi-token.sh test"
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
# Check dependencies
if ! command -v jq &> /dev/null; then
echo "⚠️ jq is not installed. Install with: sudo apt install jq"
fi
# Create _meta.json for OpenClaw skill registration
The manifest describes an Omi.me integration for memories, tasks, conversations, and sync. Creating system-wide symlinks in /usr/local/bin is not part of that business purpose; it is an installation-side capability that modifies the host environment outside the skill's own config area.
No suspicious patterns detected.