T09 · Insecure Skill Coding Practices
- Location
config.json:4- Finding
Live API Credentials Committed Across Source Code, Configuration, Tests, and Documentation
- Content
View full analysis
Vulnerability Details
File Location:
config.json:4-9; additional occurrences includefinal_skill.py:17-18,scripts/fetch_data.py:27-30,mcp_config.json:4-7,test_mcp_sse.py:74-81,test_mcp_protocol.py:112-113, andtest_updated_api.py:58-60.Vulnerability Type: Hardcoded authentication credentials
Risk Level: HighVulnerable Code
json { "mcpServers": { "investmenttracker": { "url": "https://claw.investtracker.ai/mcp", "headers": { "Authorization": "Bearer it_live_IGWL2ZjlCHmxHCHMV_AFU87xz0CszLrJTCvfzs5gAjo", "Accept": "application/json, text/event-stream", "Content-Type": "application/json" } } } }Another shared credential is directly embedded in executable code:
python class FinalInvestmentTracker: """Final investment tracker using the MCP API.""" def __init__(self): self.api_url = "https://investmenttracker-ingest-production.up.railway.app/mcp" self.api_key = "it_live_E8MnP28kdPmgpxdjfRG1wzUB9Nr7mCiBU34NjFkAPes"Technical Analysis
The project contains two live-looking API credentials. One shared credential appears 78 times across Python files, shell scripts, JSON configuration, tests, deployment documents, and examples. A second bearer credential is present in the active
config.json.Credentials committed to a distributable Skill must be considered compromised because every person or automated system that downloads the package can extract them. Documentation files do not provide protection: they are distributed with the same artifact and are searchable through ordinary text-processing tools.
The credentials authenticate requests to APIs that expose identity, positions, transaction information, investment methodology, and performance statistics. Although transmitting a user-provided credential to the declared InvestmentTracker service is necessary for the Skil ...[truncated 1298 chars]
- Remediation
View remediation
Remediation Suggestions
- Revoke and rotate both exposed credentials immediately.
- Remove every credential occurrence from source code, tests, configuration, examples, documentation, release archives, and version-control history.
- Replace committed values with explicit placeholders such as
YOUR_API_KEY. - Load user-specific credentials from a protected environment variable, operating-system credential store, or deployment secret manager.
- Do not provide a shared default credential. Fail safely or use simulated mode when no user credential is configured.
- Use narrowly scoped, short-lived, revocable tokens where the service supports them.
- Add automated secret scanning to commits, continuous integration, packaging, and release workflows.
- Review service logs for unauthorized use of both exposed tokens.
