Back to skill

Security audit

DreamAPI Skill

Security checks for vulnerabilities and agentic risk

Overview

This skill mostly matches its DreamAPI media-generation purpose, but it under-discloses sensitive face, voice, video, and API-key handling that users should review carefully before installing.

Review this skill before installing. Use only media you have rights and consent to process, assume prompts and uploaded files are sent to DreamAPI, avoid pasting API keys into chat or command lines, prefer a protected environment secret over the plaintext credential file, and be especially cautious with face swap, voice clone, lip-sync translation, and watermark removal requests.

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

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:47
Finding

API Keys May Be Exposed Through Agent Conversations and Command-Line Arguments

Content
View full analysis
None: """Save API key — user pastes it interactively or via --key flag.""" api_key = args.key if not api_key: print() print(" DreamAPI Authentication") print(" ─────────────────────────────────────────") print(f" Get your API key from: {DASHBOARD_URL}") print(" Go to Dashboard → API Keys → Copy your key") print() api_key = input(" Paste your API key here: ").strip() ``` `scripts/auth.py:221-233`: ```python Examples: python auth.py login # interactive: paste your key python auth.py login --key "sk-abc..." # non-interactive python auth.py status # check if authenticated python auth.py logout # remove credentials """, ) sub = parser.add_subparsers(dest="subcommand") sub.required = True p_login = sub.add_parser("login", help="Save your API key") p_login.add_argument( "--key", default=None, help="API key (skip interactive prompt)", ) ``` ### Technical Analysis The Skill instructs users to provide an API key directly to the agent. Secrets supplied through a conversation can remain in chat history, agent execution transcripts, telemetry, or service logs. The documented `--key` mechanism creates another exposure channel because command-line arguments may be retained in shell history, captured by execution logs, or temporarily visible through process-inspection facilities. Although an interactive path exists, it uses `input()`, which visibly echoes the key. These exposure channels are unnecessary becau ...[truncated 1286 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Note
Location
scripts/auth.py:36
Finding

Credential File Creation Is Susceptible to Symlink and Non-Atomic Write Risks

Content
View full analysis
None: """Persist API key to credentials file.""" CRED_FILE.parent.mkdir(parents=True, exist_ok=True) creds = { "api_key": api_key, "created_at": datetime.now(timezone.utc).isoformat(), } if extra: creds.update(extra) CRED_FILE.write_text(json.dumps(creds, indent=2)) CRED_FILE.chmod(0o600) ``` ### Technical Analysis The credential file is written to the predictable path `~/.dreamapi/credentials.json` using `Path.write_text()`. The implementation does not reject symbolic links, does not use exclusive creation, and does not perform an atomic temporary-file replacement. If the destination is a symbolic link, the write follows that link. The subsequent `chmod(0o600)` can also affect the resolved target. In addition, the file is written before its permissions are explicitly changed to `0600`; therefore, the initial mode depends on the process umask and there may be a brief interval during which the file has broader permissions. Successful exploitation requires the attacker to have sufficient local access to manipulate the victim's `.dreamapi` directory or destination path. Under correctly configured private home-directory permissions, that prerequisite may substantially reduce exploitability. ### Attack Path 1. A local attacker gains the ability to create or replace entries under the victim's `~/.dreamapi` directory. 2. The attacker creates `credentials.json` as a symbolic link to another file writable by the victim. 3. The victim runs the DreamAPI login command. 4. `CRED_FILE.write_text()` follows the symbolic link and writes the credential JSON to the selected target. 5. `CRED_FILE.chmod(0o600)` changes the target's permissions. 6. Depending on the chose ...[truncated 747 chars]
Remediation
View remediation

T08 · Insecure Dependencies

Note
Location
scripts/requirements.txt:1
Finding

Open-Ended Dependency Constraints Make Installations Non-Reproducible

Content
View full analysis
=2.28.0 python-dotenv>=0.19.0 ``` `SKILL.md:76-79`: ```bash pip install -r {baseDir}/scripts/requirements.txt ``` ### Technical Analysis Both dependencies use minimum-only version constraints. An installation can therefore resolve to any current or future package release satisfying the lower bound. The project provides no lockfile and no package hashes, so the dependency artifacts used during installation are not reproducibly tied to versions reviewed with this Skill. No malicious or misspelled package was identified: both names correspond to established packages. The risk arises from accepting unreviewed future versions and relying on package-index integrity rather than from a confirmed malicious dependency currently included in the project. Python package installation can execute package build or installation logic. Consequently, a compromised upstream release or dependency-resolution event could introduce code that executes in the environment performing the installation. ### Attack Path 1. A future allowed release of `requests`, `python-dotenv`, or a transitive dependency is compromised or otherwise contains malicious installation/runtime behavior. 2. A user follows the Skill instructions and runs `pip install -r scripts/requirements.txt`. 3. The package resolver selects the affected release because it satisfies the open-ended `>=` constraint. 4. The package's build, installation, import, or runtime code executes in the user's environment. 5. The malicious dependency gains the permissions of the user running the installation or Skill. This path depends on an upstream compromise or unsafe package source; the audited repository itself does not contain a confirmed malicious dependency. ...[truncated 549 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (65)

Missing User Warnings

High
Category
Not specified by scanner
Confidence
96% confidence
Finding

The README advertises processing of sensitive media such as faces, voices, videos, and translated lip-synced content, but does not warn users that uploads may be transmitted to a third-party service or that consent/privacy obligations apply. In this skill context, that omission is particularly dangerous because the core features enable identity-affecting operations like voice cloning and face swapping, which can expose biometric data and facilitate misuse.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The declared description promises a broad end-user media generation/editing capability set, but the code chunk does not implement any of those functions. Its primary purpose is credential management for DreamAPI access. While authentication can be a supporting component of such a skill, this chunk by itself is materially different from the declared purpose because it only handles login, status, and logout, including local storage of API keys and validation against an account credits endpoint. That is an undeclared operational capability and not the advertised AI media tool functionality.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The declared description promises a broad end-user feature set centered on AI-powered media creation and editing. The supplied code chunk does not implement any of those capabilities; it solely handles configuration/authentication support by reading credentials from environment variables or ~/.dreamapi/credentials.json and printing setup instructions on failure. While credential loading can be a supporting detail for such a skill, this chunk by itself materially differs from the declared purpose and exposes an undeclared behavior category: local credential access/config loading rather than media-generation functionality.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
93% confidence
Finding

The description promises a collection of AI-powered content tools that generate or edit media based on user requests. This code does not implement any such media-generation or editing behavior. Instead, it performs file extension validation, MIME selection, requests a presigned upload policy, uploads a local file to storage, verifies the upload, and returns a public URL. While uploading assets could be a supporting detail for a larger media toolchain, the supplied chunk’s primary purpose is storage upload, not the declared AI tooling. Because the actual behavior is materially different and includes an undeclared storage-upload capability, this chunk is a mismatch.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The declared description emphasizes a broad set of AI-powered content creation tools, but the actual code only implements a credit-checking command for account/billing information. There is no evidence in this chunk of video generation, avatar creation, image editing, voice cloning, or other creative media operations. The primary purpose is materially different: account credit retrieval rather than AI tool execution.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The declared description presents a wide-ranging multi-tool DreamAPI skill covering 25 AI-powered tools across several media domains, including talking avatars, image editing, and voice cloning. The supplied code chunk, however, is narrowly focused on video generation only. It exposes three specific subcommands—text2video, image2video, and head-tail—and interacts only with corresponding DreamAPI video endpoints. There is no implementation here for talking avatars, image editing, voice cloning, or any larger suite of 25 tools. While the video-generation portion is consistent with part of the description, the code materially underdelivers relative to the declared breadth, so the description does not accurately represent this code chunk.

Content

No source excerpt is available for this finding.

Credential Access

High
Category
Privilege Escalation
Confidence
95% confidence
Finding

The instructions explicitly direct users to save the API key into ~/.dreamapi/credentials.json, creating a discoverable local secret store. If the host is compromised, backed up insecurely, synced, or shared, the token can be stolen and used to access the user's DreamAPI account and consume billable resources or retrieve associated data.

Content

Scanner excerpt · references/auth.md (reported line 21)May include surrounding context.

python {baseDir}/scripts/auth.py login

text

Paste your API key when prompted. It will be saved to `~/.dreamapi/credentials.json`.

### Option 2 — Environment variable

Credential Access

High
Category
Privilege Escalation
Confidence
91% confidence
Finding

Documenting the credential lookup order reveals a predictable location for secret material and confirms that a plaintext file is a supported authentication source. In the context of an agent skill, this increases the blast radius of any local file-read capability or host compromise because the secret path is standardized and easy to target.

Content

Scanner excerpt · references/auth.md (reported line 33)May include surrounding context.

md
The scripts check credentials in this order:
1. `DREAMAPI_API_KEY` environment variable
2. `~/.dreamapi/credentials.json` (set by `auth.py login`)

## Commands

Credential Access

High
Category
Privilege Escalation
Confidence
93% confidence
Finding

The credential file format and exact storage path provide an attacker or over-privileged local process with clear instructions on where secrets reside and what key name to extract. While mode 0600 helps, this protection does not mitigate malware, compromised user sessions, insecure backups, or accidental inclusion in support bundles and home-directory sync tools.

Content

Scanner excerpt · references/auth.md (reported line 54)May include surrounding context.

}

text

Location: `~/.dreamapi/credentials.json` (mode 0600)

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/auth.py (reported line 8)May include surrounding context.

python
Priority order:
1. Environment variable DREAMAPI_API_KEY  (CI / quick setup)
2. Credential file ~/.dreamapi/credentials.json  (set by auth.py login)
3. Error — prompts user to run auth.py login
"""

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/auth.py (reported line 27)May include surrounding context.

python
Priority order:
1. Environment variable DREAMAPI_API_KEY  (CI / quick setup)
2. Credential file ~/.dreamapi/credentials.json  (set by auth.py login)
3. Error — prompts user to run auth.py login
"""

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/shared/config.py (reported line 5)May include surrounding context.

python
Priority order:
1. Environment variable DREAMAPI_API_KEY  (CI / quick setup)
2. Credential file ~/.dreamapi/credentials.json  (set by auth.py login)
3. Error — prompts user to run auth.py login
"""

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/shared/config.py (reported line 20)May include surrounding context.

python
Priority order:
1. Environment variable DREAMAPI_API_KEY  (CI / quick setup)
2. Credential file ~/.dreamapi/credentials.json  (set by auth.py login)
3. Error — prompts user to run auth.py login
"""

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The README encourages very broad natural-language requests such as face swapping, voice cloning, translation, and media editing without clearly defining guardrails, consent requirements, or limits on what the agent should do automatically. In an agent-skill context, this can cause overbroad invocation and unsafe task routing, especially for sensitive media-manipulation actions that may be triggered from loosely phrased user prompts.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding

npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
93% confidence
Finding

The skill declares broad operational capabilities including shell, file, environment, and network use, but does not constrain them with an explicit permission or allowed-tools scope. In an agent setting this weakens least-privilege boundaries and increases the blast radius if the skill is misused, compromised, or prompt-injected into performing unintended actions.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The login template instructs users to give their API key to the agent, which normalizes secret disclosure to an intermediary. This is dangerous because API keys are bearer credentials; if exposed in chat history, logs, or tool invocations, an attacker or compromised system could use them to access the user's account and spend credits or retrieve account data.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The Chinese login template repeats the same unsafe pattern by asking the user to disclose an API key to the agent. Duplicating the instruction across languages broadens exposure and increases the likelihood of credential leakage through transcripts, storage, or downstream tooling.

Content

No source excerpt is available for this finding.

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
80% confidence
Finding

Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Content

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

md
> **These rules apply to ALL generation modules.**

1. **Always start with `run`** — it submits the task and polls automatically until done.
2. **Do NOT ask the user to check the task status themselves.** The agent polls until completion.
3. **Only use `query`** when `run` has already timed out and you have a `taskId` to resume.
4. **If `query` also times out**, increase `--timeout` and try again with the same `taskId`.
5. **Do not resubmit** unless the task has actually failed.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill states that local image/audio/video files are auto-uploaded, but provides no prominent user warning or consent flow about off-device transmission to a third-party service. This is dangerous because users may unintentionally send sensitive media, biometric data, voices, or proprietary files to an external platform without informed approval.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The documentation instructs users to persist a sensitive API key to a local credentials file without any warning about secret handling, host trust, backup exposure, or shared-account risk. Even with mode 0600, storing long-lived credentials on disk increases the chance of accidental disclosure through backups, malware, shell history from non-interactive use, or multi-user environment misconfiguration.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The documentation repeatedly instructs users to provide remote URLs or local media paths that will be submitted to DreamAPI endpoints, but it does not warn that those files may be uploaded to and processed by a third-party service. This can lead to unintended disclosure of sensitive audio, video, biometric, or copyrighted media, especially because the tools handle face images, voice audio, and avatar generation where privacy expectations are high.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The documentation exposes a face-swapping capability with no warning, policy boundary, or consent requirement, which lowers friction for impersonation, non-consensual image manipulation, and deceptive content creation. In an agent skill that makes powerful media-editing tools easy to invoke, omission of misuse guidance and safeguards increases the likelihood of abuse even if the feature also has legitimate uses.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The documentation describes text-to-image and image-to-image features that send prompts and source images to remote DreamAPI endpoints, but it does not clearly warn users that their inputs leave the local environment. This can lead to unintended disclosure of sensitive prompts, proprietary images, personal data, or regulated content, especially because the image2image mode explicitly accepts local file paths and URLs.

Content

No source excerpt is available for this finding.

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
80% confidence
Finding

Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Content

Scanner excerpt · references/polling.md (reported line 32)May include surrounding context.

md
## Agent Workflow Rules

1. **Always use `run`** for new requests — it submits and polls automatically.
2. **Never ask the user to check status manually.** The agent polls to completion.
3. **Only use `query`** when `run` timed out and you have a `taskId` to resume.
4. **If `query` also times out**, increase `--timeout` and try again with the same `taskId`.
5. **Do not resubmit** unless the task status is actually "failed" (code 4).