T09 · Insecure Skill Coding Practices
- Location
scripts/lib.sh:7- Finding
Bankr API key can be transmitted to an attacker-controlled endpoint
- Content
View full analysis
/dev/null 2>&1; then key="$(systemctl --user show-environment 2>/dev/null | sed -n "s/^BANKR_API_KEY=//p" | head -n1 || true)" fi if [ -z "$key" ] && [ -f "$HOME/.openclaw/skills/bankr/config.json" ]; then key="$(jq -r '.apiKey // empty' "$HOME/.openclaw/skills/bankr/config.json" 2>/dev/null || true)" fi if [ -z "$key" ] && [ -f "$HOME/.openclaw/workspace/skills/bankr/config.json" ]; then key="$(jq -r '.apiKey // empty' "$HOME/.openclaw/workspace/skills/bankr/config.json" 2>/dev/null || true)" fi [ -n "$key" ] || err "BANKR_API_KEY not found in env, systemd, or Bankr config" echo "$key" } ``` Transaction submission sends the recovered credential to the configurable endpoint: ```bash submit_bankr_tx() { local to_address="$1" local calldata="$2" local description="$3" local api_key local payload api_key="$(resolve_bankr_api_key)" payload="$(jq -n \ --arg to "$to_address" \ --arg data "$calldata" \ --arg description "$description" \ '{transaction:{to:$to,chainId:8453,value:"0",data:$data},description:$description,waitForConfirmat ...[truncated 4258 chars]- Remediation
View remediation
