Back to skill

Security audit

Otta CLI Agent

Security checks for vulnerabilities and agentic risk

Overview

The skill is purpose-aligned for Otta CLI automation, but its primary login example handles a password in a way that can expose credentials.

Review before installing. Use this only with an Otta account you intend the agent to access, prefer `--password-stdin` or a protected secret flow, ensure logs and command diagnostics redact `OTTA_CLI_PASSWORD`, access tokens, and refresh tokens, and confirm any add/update/delete worktime action before execution.

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

T09 · Insecure Skill Coding Practices

Error
Location
SKILL.md:27
Finding

Otta password exposed through command-line arguments and diagnostic reporting

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, line 27 and lines 139–140
Vulnerability Type: Credential exposure through process arguments and insufficiently defined diagnostic redaction
Risk Level: High

Vulnerable Code

bash
otta auth login --username "$OTTA_CLI_USERNAME" --password "$OTTA_CLI_PASSWORD" --format json
text
8. Return exact command, exit code, and concise stderr message when failures happen.
9. Never print raw credentials or tokens in summaries.

Technical Analysis

The primary authentication example passes OTTA_CLI_PASSWORD through the --password command-line argument. When the shell expands this variable, the resulting password may be present in the process argument vector. Depending on the execution environment and operating-system controls, process arguments can be exposed through process-monitoring tools, CI diagnostics, shell tracing, audit systems, or execution telemetry.

The instruction to return the “exact command” on failure creates an additional disclosure risk. Although the following rule prohibits printing raw credentials or tokens in summaries, the Skill does not explicitly require sensitive argument redaction before returning the command. An implementation could therefore reproduce an expanded secret-bearing command while attempting to comply with the failure-reporting rule.

The document does recommend --password-stdin later in the authentication section, but that recommendation does not secure the primary executable example. The safer mechanism should be the default and mandatory authentication path.

Attack Path

  1. An operator or automation environment sets OTTA_CLI_PASSWORD to a valid Otta password.
  2. The agent executes the documented login command.
  3. The shell expands the environment variable and supplies the password in the otta process argument vector.
  4. A local process observer, CI logging facility, shell-tracing mechanism, au ...[truncated 1354 chars]
Remediation
View remediation

Remediation Suggestions

  1. Replace the password-bearing command-line example with the CLI's documented standard-input mechanism:

    bash
    printf '%s' "$OTTA_CLI_PASSWORD" | \
      otta auth login \
        --username "$OTTA_CLI_USERNAME" \
        --password-stdin \
        --format json
    
  2. State that agents must never pass passwords, access tokens, or refresh tokens through command-line arguments.

  3. Replace the “return exact command” rule with a redaction-aware requirement, for example:

    text
    Return a sanitized command, exit code, and concise sanitized stderr message.
    Replace credentials, tokens, authorization headers, and secret-bearing
    environment values with [REDACTED].
    
  4. Require redaction before returning commands, standard output, standard error, JSON responses, traces, or environment diagnostics. Redact at least OTTA_CLI_PASSWORD, OTTA_CLI_ACCESS_TOKEN, and OTTA_CLI_REFRESH_TOKEN.

  5. Disable shell tracing while handling secrets and configure CI systems to mask all Otta credential variables.

  6. Prefer a protected secret store or short-lived token mechanism over persistent plaintext environment variables where supported.

  7. Add a failure-path test verifying that authentication errors and agent summaries never contain the password or token values.

Vulnerability Patterns
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (1)

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 · SKILL.md (reported line 171)May include surrounding context.

md
## Failure Recovery

- `no access token configured (run \`otta auth login\`)`
  - Run `auth login`, then rerun `status`.
- `username is required (use --username)`
  - Pass `--username` or set `OTTA_CLI_USERNAME`.

Static analysis

No suspicious patterns detected.