Back to skill

Security audit

Edith API Keys

Security checks for vulnerabilities and agentic risk

Overview

This skill is mostly coherent, but it uses a powerful Unkey root credential through unsafe shell command templates for high-impact API-key administration.

Install only if you trust the operator and environment handling the Unkey root key. Prefer a least-privileged Unkey credential if available, require explicit confirmation for every create, update, and delete action, avoid logging or sharing generated keys, and replace the shell templates with a safer structured HTTP client or JSON serializer before routine use.

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

T09 · Insecure Skill Coding Practices

Error
Location
SKILL.md:24
Finding

Shell Command Injection Through Unsafe User-Controlled Placeholder Interpolation

Content
View full analysis

Vulnerability Details

File Location: SKILL.md:24-38, SKILL.md:53-57, SKILL.md:62-66, SKILL.md:71-83, and SKILL.md:100-112
Vulnerability Type: Shell command injection
Risk Level: High

The documented commands interpolate user-controlled values directly into shell command text. Representative vulnerable code from SKILL.md:24-38:

bash
curl -s -X POST https://api.unkey.dev/v1/keys.createKey \
  -H "Authorization: Bearer $UNKEY_ROOT_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "apiId": "'"$UNKEY_API_ID"'",
    "name": "{{name}}",
    "prefix": "edith",
    "meta": { "purpose": "{{purpose}}" },
    "expires": {{expires_unix_ms_or_null}},
    "ratelimit": {
      "async": true,
      "limit": {{rate_limit_per_second_or_10}},
      "duration": 1000
    }
  }'

Additional affected commands include:

bash
curl -s -X POST https://api.unkey.dev/v1/keys.deleteKey \
  -H "Authorization: Bearer $UNKEY_ROOT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"keyId": "{{keyId}}"}'
bash
curl -s -X POST https://api.unkey.dev/v1/keys.verifyKey \
  -H "Content-Type: application/json" \
  -d '{"apiId": "'"$UNKEY_API_ID"'", "key": "{{key}}"}'
bash
curl -s -X POST https://api.unkey.dev/v1/keys.updateKey \
  -H "Authorization: Bearer $UNKEY_ROOT_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "keyId": "{{keyId}}",
    "name": "{{new_name}}",
    "ratelimit": {
      "async": true,
      "limit": {{new_limit}},
      "duration": 1000
    }
  }'

Technical Analysis

Values such as name, purpose, keyId, key, expiration, and rate-limit fields are inserted directly into commands containing single-quoted JSON. If the Skill implementation performs textual placeholder substitution, an attacker-controlled single quote can terminate the quoted JSON argument. The attacker can then append shell metacharact ...[truncated 1343 chars]

Remediation
View remediation

Remediation Suggestions

  • Do not construct shell commands through textual interpolation of user-controlled data.
  • Prefer a dedicated HTTP client or structured API tool that sets headers and serializes JSON in-process.
  • If shell execution is unavoidable, build request bodies with a JSON serializer such as jq, passing strings through --arg and validated numeric values through --argjson.
  • Pass values through environment variables or positional parameters rather than inserting them into executable command text.
  • Validate key IDs against an explicit expected character set and length.
  • Parse expiration and rate-limit values as integers and enforce minimum and maximum bounds.
  • Treat names and purposes as untrusted text and impose reasonable length limits.
  • Add adversarial tests containing quotes, command substitutions, semicolons, newlines, and other shell metacharacters.
  • Run the Skill under a minimally privileged operating-system identity with restricted file and network access to limit the consequences of any remaining injection flaw.

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:24
Finding

Privileged Root Credential Exposed Through Command-Line Arguments

Content
View full analysis

Vulnerability Details

File Location: SKILL.md:24-27
Vulnerability Type: Insecure credential handling
Risk Level: Medium

The privileged root credential is expanded directly into a curl command-line header:

bash
curl -s -X POST https://api.unkey.dev/v1/keys.createKey \
  -H "Authorization: Bearer $UNKEY_ROOT_KEY" \
  -H "Content-Type: application/json" \

The same credential-handling pattern also appears at SKILL.md:44-45, SKILL.md:53-55, SKILL.md:71-73, and SKILL.md:100-102.

Technical Analysis

Shell expansion places the value of UNKEY_ROOT_KEY in the argument vector passed to curl. Depending on the operating system, process permissions, monitoring configuration, tracing settings, and execution environment, command-line arguments may be visible through process inspection, diagnostic telemetry, debug logs, or execution traces.

The root key is substantially more sensitive than an ordinary API key because the documented workflow uses it to create, list, update, and permanently delete managed keys.

Attack Path

  1. The Skill invokes curl with the expanded root key inside the Authorization header argument.
  2. A local process-monitoring user, diagnostic collector, tracing facility, or verbose execution logger captures the command-line arguments while curl is running.
  3. The observer extracts the bearer credential from the captured authorization header.
  4. The attacker sends authenticated requests directly to the Unkey API.
  5. The attacker uses the root key to administer keys associated with the configured API.

This path depends on the host's process-observation and logging controls, but exposing privileged secrets in argument vectors unnecessarily increases the credential's attack surface.

Impact Assessment

Disclosure of UNKEY_ROOT_KEY could permit unauthorized creation, listing, modification, and deletion of API keys within the root key's Unkey authorization sc ...[truncated 234 chars]

Remediation
View remediation

Remediation Suggestions

  • Prefer an in-process HTTP client that sets the authorization header without exposing it in a child process's argument vector.
  • If curl is required, supply sensitive configuration through a protected temporary configuration file or standard-input-based mechanism rather than a command-line header.
  • Create any temporary credential material with owner-only permissions and delete it immediately after use.
  • Disable shell tracing, verbose command logging, and diagnostic capture around secret-bearing operations.
  • Restrict process inspection and telemetry access to trusted administrators.
  • Use a least-privileged Unkey credential limited to the required API and operations instead of a broadly privileged root credential where supported.
  • Rotate the root key if command arguments or execution logs may already have been captured.
  • Ensure API responses containing newly generated keys are not written to persistent logs.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (11)

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The setup requires use of UNKEY_ROOT_KEY, a highly privileged credential capable of creating, updating, listing, and deleting keys, but the documentation gives no strong warning about its sensitivity or safe handling. This increases the risk of overexposure, misuse, or unsafe reuse of a root secret in routine operator workflows.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · SKILL.md (reported line 28)May include surrounding context.

Create a key for a plugin developer or device. Optionally set a name, expiration, or rate limit.

bash
curl -s -X POST https://api.unkey.dev/v1/keys.createKey \
  -H "Authorization: Bearer $UNKEY_ROOT_KEY" \
  -H "Content-Type: application/json" \
  -d '{

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · SKILL.md (reported line 28)May include surrounding context.

Create a key for a plugin developer or device. Optionally set a name, expiration, or rate limit.

bash
curl -s -X POST https://api.unkey.dev/v1/keys.createKey \
  -H "Authorization: Bearer $UNKEY_ROOT_KEY" \
  -H "Content-Type: application/json" \
  -d '{

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · SKILL.md (reported line 50)May include surrounding context.

Create a key for a plugin developer or device. Optionally set a name, expiration, or rate limit.

bash
curl -s -X POST https://api.unkey.dev/v1/keys.createKey \
  -H "Authorization: Bearer $UNKEY_ROOT_KEY" \
  -H "Content-Type: application/json" \
  -d '{

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · SKILL.md (reported line 59)May include surrounding context.

Create a key for a plugin developer or device. Optionally set a name, expiration, or rate limit.

bash
curl -s -X POST https://api.unkey.dev/v1/keys.createKey \
  -H "Authorization: Bearer $UNKEY_ROOT_KEY" \
  -H "Content-Type: application/json" \
  -d '{

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · SKILL.md (reported line 68)May include surrounding context.

Create a key for a plugin developer or device. Optionally set a name, expiration, or rate limit.

bash
curl -s -X POST https://api.unkey.dev/v1/keys.createKey \
  -H "Authorization: Bearer $UNKEY_ROOT_KEY" \
  -H "Content-Type: application/json" \
  -d '{

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · SKILL.md (reported line 76)May include surrounding context.

Create a key for a plugin developer or device. Optionally set a name, expiration, or rate limit.

bash
curl -s -X POST https://api.unkey.dev/v1/keys.createKey \
  -H "Authorization: Bearer $UNKEY_ROOT_KEY" \
  -H "Content-Type: application/json" \
  -d '{

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · SKILL.md (reported line 105)May include surrounding context.

Create a key for a plugin developer or device. Optionally set a name, expiration, or rate limit.

bash
curl -s -X POST https://api.unkey.dev/v1/keys.createKey \
  -H "Authorization: Bearer $UNKEY_ROOT_KEY" \
  -H "Content-Type: application/json" \
  -d '{

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The invocation guidance says to act whenever the user asks to manage API keys, without clear limits on which operations need confirmation or what validation is required. In a voice-driven context, broad triggers can cause accidental execution of sensitive create, revoke, or update actions.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The workflow instructs the skill to display newly created API keys to the user without any guidance on masking, ephemeral handling, or avoiding logs. Since API keys are bearer secrets, exposing them in transcripts, chat history, or shared terminals can immediately compromise downstream systems.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill advertises create, revoke, and list functionality, but also documents verify and update operations. This mismatch broadens the effective capability surface beyond what a user or reviewer would expect, increasing the chance of unintended privileged actions with the root credential.

Content

No source excerpt is available for this finding.