Back to skill

Security audit

Fuku Sportsbook

Security checks for vulnerabilities and agentic risk

Overview

The skill matches its sportsbook purpose, but it can drive real-money betting and uses stored account keys with broad automation and a redirectable API endpoint, so it needs careful review before installation.

Install only if you are comfortable with an AI-assisted sportsbook workflow. Do not deposit USDC unless you accept real-money loss, custodial wallet risk, jurisdictional/legal limits, and irreversible transfer mistakes. Treat ~/.fuku/agent.json as a sensitive credential file, avoid running authenticated scripts with FUKU_API_URL set, and require explicit human confirmation before posting picks, recording bets, setting wallets, or requesting withdrawals.

Vulnerability Patterns
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (1)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/check_bets.sh:31
Finding
Unvalidated API endpoint override can exfiltrate authentication credentials and sensitive account data<![CDATA[ ## Vulnerability Details **File Locations**: - `scripts/check_bets.sh:31,57-58` - `scripts/my_stats.sh:31,67-68` - `scripts/check_notifications.sh:50,84-86,127-132` - `scripts/post_pick.sh:42,202-205,244-247` - `scripts/register.sh:37,125-139,183-190` **Vulnerability Type**: Unvalidated destination for authenticated and sensitive network requests **Risk Level**: High ### Vulnerable Code #### `scripts/check_bets.sh:31,57-58` ```bash API_BASE="${FUKU_API_URL:-https://cbb-predictions-api-nzpk.onrender.com}" RESPONSE=$(curl -sS "${API_BASE}/api/dawg-pack/agents/${AGENT_NAME}" \ -H "X-Dawg-Pack-Key: ${API_KEY}" 2>/dev/null) ``` #### `scripts/my_stats.sh:31,67-68` ```bash API_BASE="${FUKU_API_URL:-https://cbb-predictions-api-nzpk.onrender.com}" RESPONSE=$(curl -sS "${API_BASE}/api/dawg-pack/agents/${AGENT_NAME}" \ -H "X-Dawg-Pack-Key: ${API_KEY}" 2>/dev/null) ``` #### `scripts/check_notifications.sh:50,84-86,127-132` ```bash API_BASE="${FUKU_API_URL:-https://cbb-predictions-api-nzpk.onrender.com}" RESPONSE=$(curl -s -w "\n%{http_code}" \ -H "X-Dawg-Pack-Key: ${FUKU_API_KEY}" \ "$URL") ACK_RESPONSE=$(curl -s -w "\n%{http_code}" \ -X POST \ -H "X-Dawg-Pack-Key: ${FUKU_API_KEY}" \ -H "Content-Type: application/json" \ -d "{\"ids\": $IDS_JSON}" \ "${API_BASE}/api/dawg-pack/notifications/ack") ``` #### `scripts/post_pick.sh:42,202-205,244-247` ```bash API_BASE="${FUKU_API_URL:-https://cbb-predictions-api-nzpk.onrender.com}" RESPONSE=$(curl -sS -X POST "${API_BASE}/api/dawg-pack/posts" \ -H "X-Dawg-Pack-Key: ${API_KEY}" \ -H "Content-Type: application/json" \ -d "$(jq -n \ ... )" 2>/dev/null) BET_RESPONSE=$(curl -sS -X POST "${API_BASE}/api/dawg-pack/bets" \ -H "X-Dawg-Pack-Key: ${API_KEY}" \ -H "Content-Type: application/json" \ -d "$(jq -n \ ... )" 2>/dev/null) ``` #### `scripts/register.sh:37,125-139,183-190` ```bash API_BASE="${FUKU_API_URL:-https://cbb-predict ...[truncated 4602 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. **Pin authenticated requests to the production HTTPS origin** Do not permit environment variables to override the destination of requests carrying production credentials: ```bash readonly API_BASE="https://cbb-predictions-api-nzpk.onrender.com" ``` 2. **If overrides are required, enforce an explicit allowlist** Validate both the scheme and exact hostname before reading or attaching credentials: ```bash DEFAULT_API_BASE="https://cbb-predictions-api-nzpk.onrender.com" API_BASE="${FUKU_API_URL:-$DEFAULT_API_BASE}" case "$API_BASE" in "https://cbb-predictions-api-nzpk.onrender.com") ;; *) echo "Error: Untrusted API endpoint: $API_BASE" >&2 exit 1 ;; esac ``` 3. **Separate development credentials from production credentials** If local or staging endpoints must be supported, require a dedicated test mode and refuse to load `~/.fuku/agent.json` in that mode. Use separate, limited-scope credentials. 4. **Require HTTPS** Reject plaintext HTTP and non-HTTP schemes. Validate the final request URL before invoking `curl`. 5. **Apply least-privilege credentials** Use separate API tokens for read-only account access, posting, betting, notifications, and wallet operations. A key used to view statistics should not authorize account mutations. 6. **Harden network requests** Add strict failure handling and protocol restrictions: ```bash curl --fail-with-body \ --silent \ --show-error \ --proto '=https' \ --tlsv1.2 \ ... ``` 7. **Protect environment-controlled execution** Launch the Skill with a sanitized environment and explicitly remove unexpected endpoint variables: ```bash unset FUKU_API_URL ``` 8. **Rotate potentially exposed keys** Users who have run authenticated scripts with an untrusted or unexpected `FUKU_API_URL` should revoke and replace their API ke ...[truncated 84 chars]
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Rogue AgentSelf-Modification, Session Persistence
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
Findings (30)

Missing User Warnings

High
Confidence
97% confidence
Finding
The paid-tier description states that the agent can bet autonomously from a real USDC balance, but it does not present a strong, explicit warning about real-money loss, custodial risk, or the need for affirmative consent before enabling such behavior. In an agent skill, that omission is dangerous because users may not understand that a natural-language interaction can lead to autonomous financial activity with actual funds.

Missing User Warnings

Medium
Confidence
93% confidence
Finding
The README encourages users to deposit real USDC into custodial wallets and states that the operator holds the private keys, but it does not prominently warn about custody risk, loss of funds, counterparty risk, or jurisdiction/compliance concerns. In a skill designed for autonomous agents, this is especially risky because an agent could guide a user into sending real funds without ensuring informed consent or manual verification.

Missing User Warnings

Medium
Confidence
91% confidence
Finding
The withdrawal flow describes setting an arbitrary wallet and requesting withdrawals without clear warnings that blockchain transfers are irreversible and that an incorrect destination address can permanently destroy or misdirect funds. Because this skill is meant for AI-assisted operation, the lack of mandatory verification increases the chance of user or agent error leading to unrecoverable asset loss.

External Transmission

Medium
Category
Data Exfiltration
Content
Configure quiet hours and preferences:
```bash
# Set quiet hours (no notifications 11 PM – 8 AM)
curl -X PUT "$API/api/dawg-pack/notifications/preferences" \
  -H "X-Dawg-Pack-Key: YOUR_KEY" \
  -d '{"quiet_hours_start": 23, "quiet_hours_end": 8, "timezone": "America/New_York"}'
```
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Session Persistence

Medium
Category
Rogue Agent
Content
This skill provides access to the Fuku Sportsbook system, allowing users to:

1. **Query Sports Statistics** - Get predictions, odds, team stats, and player data
2. **Register a Betting Agent** - Create their own AI betting agent
3. **Receive Notifications** - Poll for pick alerts and bet results
4. **Track Performance** - Monitor bets, stats, and leaderboard position
Confidence
82% confidence
Finding
The skill is explicitly designed to create an agent, store configuration in the user's home directory, poll notifications, and track betting performance over time, which establishes persistent state and ongoing agent behavior. In a financial and wagering context, such persistence raises risk because stored credentials and automated recurring actions can continue beyond the user's immediate intent.

Vague Triggers

Medium
Confidence
95% confidence
Finding
The trigger phrases for bets, stats, and notifications are broad enough that normal sports-related conversation like 'show my bets' or 'how am I doing?' could activate account-affecting workflows. In a skill that can access betting state and potentially lead into financial actions, ambiguous activation increases the risk of unintended tool execution and disclosure of account data.

External Transmission

Medium
Category
Data Exfiltration
Content
```bash
# Get undelivered notifications
curl "https://cbb-predictions-api-nzpk.onrender.com/api/dawg-pack/notifications" \
  -H "X-Dawg-Pack-Key: YOUR_API_KEY"

# Acknowledge receipt
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
```bash
# Get your deposit address
curl "https://cbb-predictions-api-nzpk.onrender.com/api/dawg-pack/agents/{agent_id}/wallet" \
  -H "X-Dawg-Pack-Key: YOUR_API_KEY"
```
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Vague Triggers

Medium
Confidence
97% confidence
Finding
The summary trigger table uses very generic phrases like 'register', 'predictions', 'my stats', and 'bankroll', which are likely to overlap with ordinary conversation. Because this skill includes registration, authenticated account access, and real-money wallet operations, low-specificity routing can cause accidental invocation and unsafe transitions into sensitive flows.

Missing User Warnings

Medium
Confidence
93% confidence
Finding
The walkthrough explicitly instructs the user to publicly post a real-money wager and analysis, normalizing gambling activity without any warning about financial risk, legal/compliance concerns, or the consequences of publishing betting picks. In the context of an agent skill, this can encourage unsafe financial behavior and reputational or regulatory exposure, especially for inexperienced users following the guide literally.

Missing User Warnings

Medium
Confidence
93% confidence
Finding
The file presents a concrete betting recommendation, exact stake amount, and implied confidence without any risk disclosure or responsible gambling warning. In a skill context, this can normalize financial risk-taking and encourage users to act on potentially speculative advice without understanding loss exposure or legal/eligibility considerations.

Missing User Warnings

Medium
Confidence
93% confidence
Finding
The script reads an API key from the local config and sends it in HTTP headers to two remote API endpoints. While the file header says it checks balance and transaction history, there is no explicit user-facing warning, prompt, or comment near the network operations disclosing that credentials and account identifiers are being transmitted.

Missing User Warnings

Medium
Confidence
92% confidence
Finding
This shell script reads an API key from ~/.fuku/agent.json and sends it to a remote API via curl using the X-Dawg-Pack-Key header. Although the help text mentions the config file requirement, the script does not provide a runtime disclosure or warning that stored credentials and betting/account data will be sent over the network.

External Transmission

Medium
Category
Data Exfiltration
Content
# Build JSON array of IDs
    IDS_JSON=$(echo "$BODY" | jq '[.[].id]')
    
    ACK_RESPONSE=$(curl -s -w "\n%{http_code}" \
        -X POST \
        -H "X-Dawg-Pack-Key: ${FUKU_API_KEY}" \
        -H "Content-Type: application/json" \
Confidence
70% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Missing User Warnings

Medium
Confidence
88% confidence
Finding
This code performs an authenticated network request using the API key from ~/.fuku/agent.json, which transmits sensitive credentials to a remote endpoint. The file has no confirmation prompt, no explicit disclosure near the request, and the help text only mentions that an API key is required, not that it will be sent over the network.

External Transmission

Medium
Category
Data Exfiltration
Content
echo ""
echo "Posting pick..."

RESPONSE=$(curl -sS -X POST "${API_BASE}/api/dawg-pack/posts" \
    -H "X-Dawg-Pack-Key: ${API_KEY}" \
    -H "Content-Type: application/json" \
    -d "$(jq -n \
Confidence
89% confidence
Finding
This curl call transmits the assembled post content and betting metadata to an external service using an API key from the local config file. While the transmission appears intentional for the script's purpose, it is still a valid security concern because user-provided analysis content is exfiltrated off-host without an explicit consent step or minimization of transmitted data.

Missing User Warnings

Medium
Confidence
91% confidence
Finding
The script sends the user's full analysis text, pick details, amount, sport, odds, and game information to remote API endpoints, but it does not clearly disclose beforehand what exact data will be transmitted or request explicit confirmation before sending. In a shell script context, this can surprise users and cause unintentional disclosure of potentially sensitive or proprietary betting analysis to a third-party service.

External Transmission

Medium
Category
Data Exfiltration
Content
echo ""
    echo "Recording bet..."
    
    BET_RESPONSE=$(curl -sS -X POST "${API_BASE}/api/dawg-pack/bets" \
        -H "X-Dawg-Pack-Key: ${API_KEY}" \
        -H "Content-Type: application/json" \
        -d "$(jq -n \
Confidence
87% confidence
Finding
This second curl call sends bet metadata, including game, pick, amount, odds, sport, and a post URL, to another remote endpoint after the initial post succeeds. The behavior increases exposure by performing an additional external transmission automatically, potentially duplicating sensitive activity data without a separate warning or consent step.

External Transmission

Medium
Category
Data Exfiltration
Content
echo "Submitting registration..."
echo ""

REGISTER_RESPONSE=$(curl -sS -X POST "${API_BASE}/api/dawg-pack/auth/register" \
    -H "Content-Type: application/json" \
    -d "$(jq -n \
        --arg twitter "$TWITTER_HANDLE" \
Confidence
70% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
echo ""
echo "Verifying your tweet..."

VERIFY_RESPONSE=$(curl -sS -X POST "${API_BASE}/api/dawg-pack/auth/verify" \
    -H "Content-Type: application/json" \
    -d "$(jq -n \
        --arg twitter "$TWITTER_HANDLE" \
Confidence
70% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Content
if [[ "$VERIFY_STATUS" == "verified" ]] || echo "$VERIFY_RESPONSE" | jq -e '.verified' > /dev/null 2>&1; then
    # Save config
    mkdir -p "$CONFIG_DIR"
    chmod 700 "$CONFIG_DIR"

    jq -n \
        --arg name "$AGENT_NAME" \
Confidence
80% confidence
Finding
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Content
status: "verified_pending_approval",
            registered_at: $registered
        }' > "$CONFIG_FILE"
    chmod 600 "$CONFIG_FILE"

    echo ""
    echo -e "${GREEN}╔════════════════════════════════════════════════════════════╗${NC}"
Confidence
80% confidence
Finding
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

External Transmission

Medium
Category
Data Exfiltration
Content
echo
echo "Updating withdrawal address..."

RESPONSE=$(curl -s -X PUT "${API_BASE}/api/dawg-pack/agents/${AGENT_ID}/wallet" \
    -H "X-Dawg-Pack-Key: ${API_KEY}" \
    -H "Content-Type: application/json" \
    -d "{\"withdrawal_address\": \"${NEW_ADDR}\"}")
Confidence
70% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
echo
echo "Submitting withdrawal request..."

RESPONSE=$(curl -s -X POST "${API_BASE}/api/dawg-pack/agents/${AGENT_ID}/withdraw" \
    -H "X-Dawg-Pack-Key: ${API_KEY}" \
    -H "Content-Type: application/json" \
    -d "{\"amount\": \"${AMOUNT}\"}")
Confidence
70% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Vague Triggers

Medium
Confidence
89% confidence
Finding
The manifest description advertises broad capabilities around registration, data access, posting picks, leaderboard activity, and virtual-currency interactions without clearly stating the conditions, permissions, or user-confirmation requirements for those actions. In a skill that also declares exec/read/write capabilities and includes wallet-related scripts, vague capability language can mislead users and downstream agents about what operations may be invoked automatically.

Static analysis

No suspicious patterns detected.