T09 · Insecure Skill Coding Practices
- Location
scripts/deep_research.py:118- Finding
Gemini API Key Exposed Through Command-Line Arguments
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This is a straightforward Gemini Deep Research helper that uses the documented Google API and saves local reports, but users should avoid sending sensitive material unless approved.
Install only if you are comfortable sending research prompts and any referenced file-search context to Google Gemini. Prefer GEMINI_API_KEY over --api-key, avoid secrets or regulated data in queries, choose an output directory outside shared repositories when needed, and review or delete the generated JSON metadata after use.
scripts/deep_research.py:118Gemini API Key Exposed Through Command-Line Arguments
scripts/deep_research.py:43Gemini API Requests Can Block Indefinitely Due to Missing Timeouts
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
}
while True:
response = requests.get(
f"{API_BASE}/interactions/{interaction_id}",
headers=headers
)
The skill advertises capabilities that involve environment-variable access, network access, and file writing, but it does not declare an explicit tool scope such as permissions or allowed-tools. This creates a trust and governance gap: callers cannot easily constrain or review what resources the skill is expected to use, increasing the chance of over-broad execution in environments where such declarations are relied upon for policy enforcement.
The skill instructs users to send queries to an external Gemini API endpoint and optionally compare against a file-search store, but it does not clearly warn that user prompts and referenced data may be transmitted to third-party services. In a research skill, users are especially likely to submit internal strategy, market, or financial material, so the lack of an explicit privacy notice raises meaningful risk of unintended data exposure.
The documentation states that final reports and full interaction metadata are saved to timestamped files, but it does not warn that those files may contain sensitive prompts, research targets, internal context, or externally retrieved data. Persisting such material without an explicit privacy warning or retention guidance can lead to accidental local disclosure, inclusion in backups, or later exfiltration from the workstation or repository.
The script transmits user-supplied research queries, optional formatting instructions, and potentially file_search_store references to an external Google API. In this skill context, that behavior is expected, but it can still expose sensitive prompts, internal data references, or confidential research topics to a third party if users pass secrets or proprietary material.
"file_search_store_names": [file_search_store]
}]
response = requests.post(
f"{API_BASE}/interactions",
headers=headers,
json=payload
No suspicious patterns detected.