T09 · Insecure Skill Coding Practices
- Location
SKILL.md:31- Finding
Plaintext API Key Persistence in Shell and MCP Configuration
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
RepoRead is a coherent repository-analysis skill that uses a disclosed external API and API key, with credential-handling and consent cautions users should understand before use.
Install only if you are comfortable sending repository URLs, analysis requests, and resulting repository context to RepoRead. Use it for public repositories by default, confirm authorization before using it on private or proprietary code, and store the API key in a protected secret manager or restricted config file rather than committing it or placing it in shared dotfiles.
SKILL.md:31Plaintext API Key Persistence in Shell and MCP Configuration
The skill invokes shell scripts and documents direct shell usage, but it does not declare an explicit tool scope such as allowed-tools or permissions. That omission increases the chance the agent can execute commands more broadly than intended, which weakens containment and makes misuse or accidental overreach harder to prevent.
Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
---
name: reporead
version: 1.2.0
description: Analyze GitHub repositories using RepoRead AI. Use when the user asks to "analyze a repo", "generate docs", "security audit a repo", "create a README", or wants AI-powered repository analysis. Supports MCP server integration and REST API.
metadata:
clawdis:
primaryEnv: REPOREAD_API_KEY
The trigger description is broad enough to match common requests like 'generate docs' or 'create a README,' which can cause the skill to activate in situations where the user did not intend external repository analysis. In this skill, overbroad activation is more dangerous because activation may lead to network calls and transmission of repository data to a third-party service.
The skill repeatedly instructs the agent to import and analyze repositories using a remote service, but it does not prominently require a user-facing warning that repository contents and metadata will be transmitted to RepoRead. This creates a real risk of unintentional exfiltration of proprietary, private, or sensitive code to an external vendor.
The MCP configuration sends requests and authentication headers to an external endpoint at api.reporead.com. While expected for the product, this is still a true security-relevant issue because using the skill causes outbound transmission of repository-related data and exposes a bearer token to a third-party service.
"mcpServers": {
"reporead": {
"type": "streamable-http",
"url": "https://api.reporead.com/mcp",
"headers": {
"Authorization": "Bearer rrk_your_api_key_here"
}
The REST API instructions direct the agent to send repository URLs, analysis requests, and authentication credentials to RepoRead's external API. In context, that means codebase information may leave the local environment, which is materially dangerous for private repositories or sensitive enterprise source code.
Or call the REST API directly:
**Base URL:** `https://api.reporead.com/public/v1`
**Auth:** `Authorization: Bearer $REPOREAD_API_KEY`
| Endpoint | Method | Description |
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
set -euo pipefail
API_KEY="${REPOREAD_API_KEY:-}"
BASE_URL="https://api.reporead.com/public/v1"
if [ -z "$API_KEY" ]; then
echo "Error: REPOREAD_API_KEY is not set."
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
set -euo pipefail
API_KEY="${REPOREAD_API_KEY:-}"
BASE_URL="https://api.reporead.com/public/v1"
if [ -z "$API_KEY" ]; then
echo "Error: REPOREAD_API_KEY is not set."
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
case "$cmd" in
balance)
curl -sf -H "$auth_header" "$BASE_URL/tokens/balance"
;;
repos)
page="${2:-1}"
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
safe_repo_id=$(sanitize_json_value "$repo_id")
safe_type=$(sanitize_json_value "$analysis_type")
json_body=$(printf '{"repository_id": "%s", "analysis_type": "%s"}' "$safe_repo_id" "$safe_type")
curl -sf -X POST -H "$auth_header" -H "Content-Type: application/json" \
-d "$json_body" "$BASE_URL/analyses"
;;
status)
This shell script performs multiple outbound HTTP requests to a third-party service using user-supplied repository data and analysis IDs. While the script's purpose implies API use, there is no explicit disclosure in the command descriptions or runtime output that these values are transmitted off-system to api.reporead.com.
No suspicious patterns detected.