T09 · Insecure Skill Coding Practices
- Location
references/karakeep-details.md:127- Finding
API key may be exposed through command-line arguments
- Content
View full analysis
--server-addr ``` ``` ### Technical Analysis The documentation recommends passing the Karakeep API key through the `--api-key` command-line option as an alternative authentication mechanism. If an agent substitutes the placeholder with a real key, the credential can become visible in: - Process argument listings while the command is running. - Process-monitoring and audit systems that record command lines. - Shell history when a shell is used. - Agent execution logs, debugging traces, or command transcripts. - Error reports that reproduce the executed command. Although authentication to the configured Karakeep server is necessary for the declared functionality, exposing the key through process arguments is not the minimum-privilege authentication method. The environment-variable example is safer than the command-line example, while a protected credential file, secret manager, or preconfigured MCP authentication channel would be preferable. The project explicitly says to avoid printing API keys, but the alternative command contradicts that objective by placing the key in a commonly observable channel. No evidence was found that the skill intentionally exfiltrates credentials to an unrelated endpoint; the concern is inadvertent local or logged disclosure. ### Attack Path 1. A user or agent follows the documented fallback example and invokes: ```bash karakeep --api-key REAL_API_KEY --server-addr ...[truncated 1393 chars]- Remediation
View remediation
