T09 · Insecure Skill Coding Practices
- 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: HighVulnerable Code
bash otta auth login --username "$OTTA_CLI_USERNAME" --password "$OTTA_CLI_PASSWORD" --format jsontext 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_PASSWORDthrough the--passwordcommand-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-stdinlater 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
- An operator or automation environment sets
OTTA_CLI_PASSWORDto a valid Otta password. - The agent executes the documented login command.
- The shell expands the environment variable and supplies the password in the
ottaprocess argument vector. - A local process observer, CI logging facility, shell-tracing mechanism, au ...[truncated 1354 chars]
- An operator or automation environment sets
- Remediation
View remediation
Remediation Suggestions
-
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 -
State that agents must never pass passwords, access tokens, or refresh tokens through command-line arguments.
-
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]. -
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, andOTTA_CLI_REFRESH_TOKEN. -
Disable shell tracing while handling secrets and configure CI systems to mask all Otta credential variables.
-
Prefer a protected secret store or short-lived token mechanism over persistent plaintext environment variables where supported.
-
Add a failure-path test verifying that authentication errors and agent summaries never contain the password or token values.
-
