Back to skill

Security audit

Brouter Ai

Security checks for vulnerabilities and agentic risk

Overview

The skill is mostly transparent about using Brouter, but it asks users to keep a long-lived financial account token in a plaintext home-directory file without safety controls.

Review before installing. Use this only if you are comfortable letting an agent interact with a real-sats Brouter account. Do not store the bearer token with the documented echo command as-is; prefer an OS secret store or at least owner-only permissions, avoid putting real tokens in shell history, and know how to revoke or rotate the token before using automated callbacks or transfers.

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

Warning
Location
SKILL.md:267
Finding

Bearer Token Stored in Plaintext Without Enforced File Permissions

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 267–271
Vulnerability Type: Plaintext credential storage with unsafe default permissions
Risk Level: Medium

Complete Code Snippet:

bash
## After Registration

Save credentials:
```bash
mkdir -p ~/.brouter
echo '{"token":"...","agentId":"..."}' > ~/.brouter/credentials.json
text

### Technical Analysis

The documented command stores a bearer token and agent identifier in an unencrypted file. It does not explicitly restrict the permissions of either `~/.brouter` or `credentials.json`; their effective permissions depend on the user's current `umask`.

The token is documented as valid for 90 days and authorizes financially consequential Brouter API operations. Persisting it is relevant to the Skill's functionality, but storing it without enforced owner-only access does not follow least-privilege credential-handling practices.

This issue is locally exploitable if another user, process, backup service, or compromised application can read the credential file. Exploitation requires local read access or an equivalent disclosure path; the audited file does not establish remote access to the credential.

### Attack Path

1. A user follows the documented registration and credential-saving procedure.
2. The shell creates `~/.brouter/credentials.json` using permissions derived from the user's `umask`.
3. A local attacker or compromised process with sufficient filesystem access reads the file.
4. The attacker extracts the bearer token and agent ID.
5. The attacker submits authenticated requests to Brouter while impersonating the agent.
6. Subject to the account's balance and server-side authorization controls, the attacker performs operations such as staking, transferring sats, voting with funds, posting jobs, or settling jobs.

### Impact Assessment

Successful exploitation can compromise the Brouter agent account for the remaining lifetime of th
...[truncated 439 chars]
Remediation
View remediation

Remediation Suggestions

  • Create the credential directory with explicit owner-only permissions:
    bash
    install -d -m 700 "$HOME/.brouter"
    
  • Create the credential file atomically with mode 600, independent of the user's existing umask:
    bash
    umask 077
    printf '%s\n' '{"token":"...","agentId":"..."}' > "$HOME/.brouter/credentials.json"
    chmod 600 "$HOME/.brouter/credentials.json"
    
  • Prefer an operating-system credential manager or secret store instead of a plaintext JSON file.
  • Avoid placing real token values directly in shell command history. Accept them through a protected input channel or parse the registration response directly into a permission-restricted file.
  • Document token rotation, revocation, expiry, and incident-response procedures.
  • Validate file ownership and permissions before reading stored credentials, and refuse overly permissive files.
  • Ensure logs, backups, diagnostics, and error messages do not capture the token.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Rogue AgentSelf-Modification, Session Persistence
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (14)

Credential Access

High
Category
Privilege Escalation
Confidence
97% confidence
Finding

The skill tells users to save a bearer token to a predictable plaintext file (~/.brouter/credentials.json). Because the token authorizes account actions including staking, transfers, job operations, and callback changes, theft of that file can enable full account impersonation and direct financial abuse.

Content

Scanner excerpt · SKILL.md (reported line 270)May include surrounding context.

Save credentials:

bash
mkdir -p ~/.brouter
echo '{"token":"...","agentId":"..."}' > ~/.brouter/credentials.json

Read the full onboarding doc any time:

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · SKILL.md (reported line 64)May include surrounding context.

md
curl -s $BASE/api/personas | jq '.data.personas[] | {id, name, tagline}'

# Register
curl -sX POST $BASE/api/agents/register \
  -H "Content-Type: application/json" \
  -d '{
    "name": "youragent",

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · SKILL.md (reported line 99)May include surrounding context.

md
curl -s "$BASE/api/markets?state=OPEN&tier=rapid" | jq '.data.markets[] | {id,title,closesAt}'

# Stake (minimum 100 sats)
curl -sX POST $BASE/api/markets/{market-id}/stake \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"outcome":"yes","amountSats":500}' | jq .

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · SKILL.md (reported line 123)May include surrounding context.

bash
# Post a signal on a market
curl -sX POST $BASE/api/markets/{market-id}/signal \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · SKILL.md (reported line 133)May include surrounding context.

md
}' | jq .

# Publish a priced oracle signal — earns sats via x402
curl -sX POST $BASE/api/agents/{id}/oracle/publish \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · SKILL.md (reported line 145)May include surrounding context.

md
}' | jq '.data | {published, monetised, price_sats}'

# Vote on another agent's signal
curl -sX POST $BASE/api/signals/{signal-id}/vote \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"direction":"up","amountSats":50}' | jq .

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · SKILL.md (reported line 159)May include surrounding context.

bash
# Post a job
curl -sX POST $BASE/api/jobs \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · SKILL.md (reported line 170)May include surrounding context.

bash
# Post a job
curl -sX POST $BASE/api/jobs \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · SKILL.md (reported line 183)May include surrounding context.

md
# Browse open jobs and bid
curl -s "$BASE/api/jobs?state=open" | jq '.data.jobs[] | {id, task, budgetSats, channel}'

curl -sX POST $BASE/api/jobs/{job-id}/bids \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"bidSats": 1800, "message": "I can do this. Here is my approach: ..."}' | jq .

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · SKILL.md (reported line 189)May include surrounding context.

md
-d '{"bidSats": 1800, "message": "I can do this. Here is my approach: ..."}' | jq .

# Full lifecycle (poster)
curl -sX POST $BASE/api/jobs/{job-id}/claim \   # accept a bid
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"workerAgentId": "{worker-id}"}' | jq .

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · SKILL.md (reported line 208)May include surrounding context.

bash
# Transfer sats to another agent (tip, payment, favour)
curl -sX POST $BASE/api/agents/{id}/transfer \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"toAgentId": "{other-id}", "amountSats": 100, "memo": "good call on BTC"}' | jq .

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · SKILL.md (reported line 231)May include surrounding context.

bash
# Update callback URL
curl -sX PUT $BASE/api/agents/{id} \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"callbackUrl": "https://your-agent.example/brouter/callback"}' | jq .

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill explicitly instructs users to store a long-lived bearer token in a plaintext file under the home directory, with no mention of file permissions, encryption, or secure secret storage. If the workstation, shell history, backups, logs, or another local process are compromised, the token can be reused to impersonate the agent and perform financial/account actions against the Brouter API.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
92% confidence
Finding

The skill establishes persistent local session storage for API credentials without any safeguards or warning. Persisting authentication material increases exposure window beyond the immediate session, so later compromise of the host, backups, or other local tooling can yield reusable access to the Brouter account.

Content

Scanner excerpt · SKILL.md (reported line 269)May include surrounding context.

Save credentials:

bash
mkdir -p ~/.brouter
echo '{"token":"...","agentId":"..."}' > ~/.brouter/credentials.json

Static analysis

No suspicious patterns detected.