T09 · Insecure Skill Coding Practices
- Location
scripts/rube.sh:14- Finding
Hardcoded Bearer Credential Exposes the Rube MCP Account
- Content
View full analysis
/dev/null SESSION_ID=$(grep -i "^mcp-session-id:" "$TEMP_HEADERS" | awk '{print $2}' | tr -d '\r' || true) rm -f "$TEMP_HEADERS" if [ -n "$SESSION_ID" ]; then RESPONSE=$(curl -s -X POST "$MCP_URL" \ -H "Content-Type: application/json" \ -H "Accept: application/json, text/event-stream" \ -H "Authorization: Bearer [REDACTED HARDCODED JWT]" \ -H "Mcp-Session-Id: $SESSION_ID" \ -d "{\"jsonrpc\":\"2.0\",\"id\":1,\"method\":\"tools/call\",\"params\":{\"name\":\"$TOOL_NAME\",\"arguments\":$ARGS}}") else RESPONSE=$(curl -s -X POST "$MCP_URL" \ -H "Content-Type: application/json" \ -H "Accept: application/json, text/event-stream" \ -H "Authorization: Bearer [REDACTED HARDCODED JWT]" \ -d "{\"jsonrpc\":\"2.0\",\"id\":1,\"method\":\"tools/call\",\"params\":{\"name\":\"$TOOL_NAME\",\"arguments\":$ARGS}}") fi ``` The credential value is intentionally redacted from this report to avoid further disclosure. In the audited source, a complete JWT appears at lines 17, 29, and 36. ### Technical Analysis Embedding an authentication token directly in a distributed shell script violates secret-management and least-privilege principles. Anyone who can read the project package, a copied Skill installation, a source archive, or a backup can recover the credential without needing code execution. The toke ...[truncated 1854 chars]- Remediation
View remediation
