Back to skill

Security audit

Motie CLI

Security checks for vulnerabilities and agentic risk

Overview

This skill is a legitimate Motie API-discovery helper, but it asks agents to install and use a broad third-party API CLI in ways that are under-scoped for user privacy and credential safety.

Review before installing. Use this only for explicit Motie or API-marketplace tasks, avoid sending private or sensitive data in searches or API calls unless you have consent, prefer the environment variable for the API key, and pin or verify the CLI package before installing it globally.

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

T08 · Insecure Dependencies

Warning
Location
skill.md:20
Finding

Unpinned Global Installation of a Third-Party npm Package

Content
View full analysis

Vulnerability Details

File Location: skill.md, lines 20–24
Vulnerability Type: Unpinned and globally installed third-party dependency
Risk Level: Medium

Vulnerable Code

markdown
The CLI is installed via: `npm install -g @saucedocs/motie-cli`

```bash
npm install -g @saucedocs/motie-cli
text

### Technical Analysis

The Skill directs users to install the latest available release of `@saucedocs/motie-cli` globally. No exact version, lockfile, package integrity value, provenance check, or reviewed source revision is specified.

npm installation may execute package lifecycle scripts such as `preinstall`, `install`, and `postinstall`. Consequently, compromise of the package, its publisher account, or a transitive dependency could cause attacker-controlled code to execute with the privileges of the user performing the installation. Global installation also expands the affected scope by placing package files or executable shims in the user's global npm environment.

The audit found no evidence that the named package is currently malicious. The vulnerability is the unsafe, mutable dependency-installation procedure.

### Attack Path

1. An attacker compromises the package publisher, package release process, or a transitive dependency.
2. The attacker publishes a malicious release under the existing package name.
3. A user follows the Skill's unpinned `npm install -g` instruction.
4. npm retrieves the current release rather than a previously reviewed version.
5. Malicious lifecycle scripts or package code execute under the installing user's account.
6. The attacker can access data and modify resources available to that account. If the user independently runs the command with elevated privileges, the impact could extend further, although elevation is not instructed by this Skill.

### Impact Assessment

Successful exploitation could result in arbitrary code execution with the installing user's privi
...[truncated 347 chars]
Remediation
View remediation

Remediation Suggestions

  • Pin the dependency to an exact, reviewed version, for example @saucedocs/motie-cli@X.Y.Z.
  • Publish and verify the expected package integrity hash and package provenance.
  • Prefer a project-local installation governed by a committed lockfile over a global installation.
  • Review direct and transitive dependencies before updating the pinned version.
  • Where compatible with the package, disable lifecycle scripts during installation and explicitly review any scripts that must run.
  • Do not instruct users to run the installation with sudo or another elevated account.
  • Document the expected package publisher, registry, version, and verification procedure.

T09 · Insecure Skill Coding Practices

Warning
Location
skill.md:12
Finding

Motie API Key May Be Exposed Through Command-Line Arguments

Content
View full analysis

Vulnerability Details

File Location: skill.md, lines 12–18 and line 82
Vulnerability Type: Sensitive credential passed as a process argument
Risk Level: Medium

Vulnerable Code

markdown
The CLI requires a Motie API key (starts with `mtk_`). Check if `MOTIE_API_KEY` is set in the environment. If not, tell the user to get one at https://beta.motie.dev under **Profile > API Key > Generate API Key**, then set it:

```bash
export MOTIE_API_KEY=mtk_your_key_here

Alternatively, pass --api-key to each command.

text

The command reference also advertises the sensitive argument:

```markdown
Options: `--method <METHOD>` (auto-detected if omitted), `--api-key <key>`, `--base-url <url>`

Technical Analysis

Passing an API key through --api-key places the secret in the command's argument vector. Depending on the operating system, shell, process-monitoring configuration, and automation environment, command-line arguments may be exposed through process listings, shell history, terminal recordings, diagnostic telemetry, CI logs, or wrapper-script logs.

The Skill provides the environment variable as its primary method, but explicitly recommends the command-line alternative without warning about its exposure risks. The key is legitimate authentication material and should not be treated as an ordinary command parameter.

Attack Path

  1. A user invokes a Motie command with --api-key mtk_....
  2. The shell records the command in history, an automation platform logs it, or a local process-monitoring mechanism captures the argument vector.
  3. Another local user, administrator, support operator, or log reader obtains access to that record.
  4. The actor extracts the Motie API key.
  5. The actor uses the key to authenticate to Motie within the permissions, quotas, and lifetime assigned to the compromised credential.

Impact Assessment

Exposure can allow unauthorized use of the victim's ...[truncated 397 chars]

Remediation
View remediation

Remediation Suggestions

  • Remove the recommendation to pass API keys using --api-key.
  • Accept credentials through a protected environment variable, standard input, an operating-system credential store, or a configuration file with restrictive permissions.
  • Warn users not to paste API keys into shell commands, chat messages, source files, or automation logs.
  • Ensure the CLI and associated logging systems redact values matching the mtk_ credential format.
  • Avoid printing the credential in error messages, debug output, or subprocess command strings.
  • Provide key rotation and revocation instructions for users who may already have exposed a key.
  • If command-line compatibility must remain, clearly mark it as unsafe and deprecated rather than presenting it as an equivalent alternative.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (2)

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill metadata and description contain very broad activation cues such as using the skill whenever an external API might help with 'any other capability' and for many generic tasks. This can cause the agent to invoke the skill in unrelated contexts, increasing the chance of unnecessary third-party API discovery or calls and expanding the attack surface for data exposure or unsafe tool use.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The instructions encourage searching for and calling external APIs through the Motie CLI but never warn that user prompts, identifiers, or other data may be transmitted to third-party services. In an agent setting, this omission can lead to silent exfiltration of sensitive user data to marketplace APIs without informed consent or a privacy check.

Content

No source excerpt is available for this finding.