T09 · Insecure Skill Coding Practices
- Location
scripts/import_to_zotero.py:255- Finding
Zotero API Key Exposed Through Command-Line Arguments
- Content
View full analysis
\ --zotero-id \ --collection "collection-name" ``` ### Technical Analysis The script requires the Zotero API key as a command-line argument. Command-line secrets can be exposed through: - Shell history files when users type or paste the documented command. - Process inspection facilities while the command is running. - Process-monitoring, telemetry, or audit systems that record complete command lines. - Terminal logs, debugging output, or automation logs containing the invocation. This behavior conflicts with the documentation's assertion that the key is never written to disk. Although the Python script does not explicitly save the key, the shell may persist the complete command automatically. Exploitation requires local access, access to command telemetry, or access to the affected user's shell history. There is no evidence that the project intentionally transmits the key to an unrelated service. ### Attack Path 1. A user follows the documented command and supplies a read/write Zotero API key through `--zotero-key`. 2. The shell records the command in its history, or the operating system exposes it in process metadata while the script runs. 3. Another local user, process, monitoring service, or attacker with access to the user's files retrieves th ...[truncated 773 chars]- Remediation
View remediation
