T09 · Insecure Skill Coding Practices
- Location
src/search.py:102- Finding
API Credentials May Be Disclosed Through HTTP Error Logging
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This appears to be a legitimate Google/Baidu search skill, but it needs review because API keys may be exposed in error output and searches are automatically sent to external providers.
Install only if you are comfortable sending search queries to Google or Baidu. Use restricted, low-quota API keys, avoid searching for secrets or sensitive business data, and consider fixing the error handling so it never prints full credential-bearing URLs.
src/search.py:102API Credentials May Be Disclosed Through HTTP Error Logging
requirements.txt:1Dependencies Are Installed Without Reproducible Version or Integrity Constraints
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
# Copy example .env file
cp .env.example .env
# Edit .env and add your API keys
nano .env
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
# Copy example .env file
cp .env.example .env
# Edit .env and add your API keys
nano .env
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
# Copy example .env file
cp .env.example .env
# Edit .env and add your API keys
nano .env
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
# Copy example .env file
cp .env.example .env
# Edit .env and add your API keys
nano .env
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
from pathlib import Path
from dotenv import load_dotenv
# Load environment variables from .env file
env_path = Path(__file__).parent.parent / '.env'
if env_path.exists():
load_dotenv(env_path)
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
from pathlib import Path
from dotenv import load_dotenv
# Load environment variables from .env file
env_path = Path(__file__).parent.parent / '.env'
if env_path.exists():
load_dotenv(env_path)
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
from pathlib import Path
from dotenv import load_dotenv
# Load environment variables from .env file
env_path = Path(__file__).parent.parent / '.env'
if env_path.exists():
load_dotenv(env_path)
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
from pathlib import Path
from dotenv import load_dotenv
# Load environment variables from .env file
env_path = Path(__file__).parent.parent / '.env'
if env_path.exists():
load_dotenv(env_path)
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
from pathlib import Path
from dotenv import load_dotenv
# Load environment variables from .env file
env_path = Path(__file__).parent.parent / '.env'
if env_path.exists():
load_dotenv(env_path)
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
from pathlib import Path
from dotenv import load_dotenv
# Load environment variables from .env file
env_path = Path(__file__).parent.parent / '.env'
if env_path.exists():
load_dotenv(env_path)
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
from pathlib import Path
from dotenv import load_dotenv
# Load environment variables from .env file
env_path = Path(__file__).parent.parent / '.env'
if env_path.exists():
load_dotenv(env_path)
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
from pathlib import Path
from dotenv import load_dotenv
# Load environment variables from .env file
env_path = Path(__file__).parent.parent / '.env'
if env_path.exists():
load_dotenv(env_path)
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
from pathlib import Path
from dotenv import load_dotenv
# Load environment variables from .env file
env_path = Path(__file__).parent.parent / '.env'
if env_path.exists():
load_dotenv(env_path)
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
from pathlib import Path
from dotenv import load_dotenv
# Load environment variables from .env file
env_path = Path(__file__).parent.parent / '.env'
if env_path.exists():
load_dotenv(env_path)
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
from pathlib import Path
from dotenv import load_dotenv
# Load environment variables from .env file
env_path = Path(__file__).parent.parent / '.env'
if env_path.exists():
load_dotenv(env_path)
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
from pathlib import Path
from dotenv import load_dotenv
# Load environment variables from .env file
env_path = Path(__file__).parent.parent / '.env'
if env_path.exists():
load_dotenv(env_path)
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
from pathlib import Path
from dotenv import load_dotenv
# Load environment variables from .env file
env_path = Path(__file__).parent.parent / '.env'
if env_path.exists():
load_dotenv(env_path)
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
from pathlib import Path
from dotenv import load_dotenv
# Load environment variables from .env file
env_path = Path(__file__).parent.parent / '.env'
if env_path.exists():
load_dotenv(env_path)
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
from pathlib import Path
from dotenv import load_dotenv
# Load environment variables from .env file
env_path = Path(__file__).parent.parent / '.env'
if env_path.exists():
load_dotenv(env_path)
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
from pathlib import Path
from dotenv import load_dotenv
# Load environment variables from .env file
env_path = Path(__file__).parent.parent / '.env'
if env_path.exists():
load_dotenv(env_path)
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
from dotenv import load_dotenv
# Load environment variables from .env file
env_path = Path(__file__).parent.parent / '.env'
if env_path.exists():
load_dotenv(env_path)
The skill advertises automatic routing between Google and Baidu based on query language, which means user input is sent to a provider selected by the tool rather than by explicit user choice. This is particularly sensitive because routing Chinese-language queries to Baidu may have privacy, jurisdiction, and compliance implications users did not knowingly accept.
The README explicitly describes automatic submission of user queries to Google or Baidu, but does not clearly warn that query contents are transmitted to third-party services. In a search skill, queries may contain sensitive or proprietary information, so silent forwarding creates a privacy and data-handling risk.
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.
1. **Get API Key:**
- Visit https://console.cloud.google.com/
- Create a new project or select existing
- Enable "Custom Search API"
- Go to APIs & Services → Credentials
- Create API Key
The skill advertises automatic routing of queries to Baidu or Google based on language and China-related keywords without explicit user opt-in per query. This can unexpectedly disclose user intent or sensitive content to a specific external provider and may route data across jurisdictions with different privacy expectations.
No suspicious patterns detected.