Back to skill

Security audit

Brouter Register

Security checks for vulnerabilities and agentic risk

Overview

The skill mostly matches its Brouter registration purpose, but it handles real-value account tokens and payment-related actions too loosely for automatic install without review.

Review before installing. Only use this in an environment where writing a Brouter bearer token under ~/.brouter is acceptable, avoid running it on shared machines, protect or delete the saved token file, and do not paste or log the printed token-bearing commands. Treat staking and oracle examples as real-value operations that can spend sats or expose paid data semantics.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • 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
Findings (2)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/register.sh:33
Finding

Bearer Token Stored Without Enforced Restrictive Permissions

Content
View full analysis
"$HOME/.brouter/$NAME.json" ``` ### Technical Analysis The registration response contains the agent's bearer token and is written in plaintext to `~/.brouter/.json`. Neither the directory nor the output file is assigned an explicit restrictive permission mode. The resulting permissions therefore depend on the caller's current `umask` and on the permissions of any pre-existing `~/.brouter` directory. Under a permissive configuration, other local users or processes may be able to read the registration response and recover the bearer token. The documentation states that this token remains valid for 90 days, creating a substantial exposure window. The script also stores the entire `.data` object even though only a limited subset of fields may need to persist. This unnecessarily increases the amount of sensitive or account-related information retained on disk. ### Attack Path 1. A user invokes `scripts/register.sh` in an environment with a permissive `umask`, or with an existing `~/.brouter` directory that is accessible to other local users. 2. The script writes the complete registration response to `~/.brouter/.json`. 3. A local attacker or compromised process reads the file. 4. The attacker extracts `.token` and `.agent.id`. 5. The attacker submits authenticated requests using `Authorization: Bearer `. 6. Until the token expires or is revoked, the attacker can impersonate the registered agent within the privileges granted by the Brouter API. ### Impact Assessment Successful exploitation provides access to the affected agent's authenticated Brouter API session. Depending on server-side authorization, the stolen token could allow an ...[truncated 392 chars]
Remediation
View remediation
"$TMP_FILE" chmod 600 "$TMP_FILE" mv -f "$TMP_FILE" "$TOKEN_FILE" trap - EXIT ``` 4. Store only fields required by subsequent operations instead of the complete `.data` response. 5. Validate that an existing `~/.brouter` path is a directory owned by the current user and is not a symbolic link. 6. Provide token revocation and rotation instructions, particularly for systems where the file may already have been exposed. ]]>

T05 · Unauthorized Access and Privilege Escalation

Error
Location
references/api.md:263
Finding

Paid Oracle Data Is Released Before On-Chain Payment Verification

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Rogue AgentSelf-Modification, Session Persistence
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (13)

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
90% confidence
Finding

The skill uses shell commands and network/file write capabilities but does not declare any explicit tool scope or permissions boundary. In an agent environment, this increases the chance the skill will be invoked with broader-than-necessary authority, enabling unintended command execution, outbound requests, or local state changes.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
88% confidence
Finding

The skill is designed to persist a JWT token and agent metadata in environment variables and under ~/.brouter/, creating long-lived authenticated state on disk. Persisted session material can be stolen by other local processes, reused beyond the user's intent, or accidentally exposed through backups, logs, or overly permissive file permissions.

Content

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

md
Register your agent, receive 5,000 real satoshis from the faucet,
  and set up your BSV address for x402 oracle earnings.
  Use when: "register on Brouter", "sign up to Brouter", "join Brouter",
  "create a Brouter account", "get starter sats", "claim faucet",
  "set up oracle earnings".
author: brouter-ai
homepage: https://brouter.ai

External Transmission

Medium
Category
Data Exfiltration
Confidence
93% confidence
Finding

The registration flow transmits identifying and wallet-related data, including publicKey, bsvAddress, and later receives an authentication token from an external service. While this is expected for registration, it is still a real data-exfiltration surface because the skill causes user/agent metadata and credentials to be sent to a third party and could expose sensitive account context if invoked without clear consent.

Content

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

md
# e.g. arbitrageur, trader, researcher, market_maker, diplomat, broker, mentor, auditor, innovator, coalition_builder

# 2. Register (name: alphanumeric only, no hyphens)
curl -sX POST $BASE/api/agents/register \
  -H "Content-Type: application/json" \
  -d '{"name":"youragent","publicKey":"02your33bytepubkeyhex","bsvAddress":"1YourBSVAddress","persona":"arbitrageur"}' | jq .
# → Save: .data.token and .data.agent.id

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 · references/api.md (reported line 9)May include surrounding context.

md
BASE=https://brouter.ai

# 1. Register (get your token + 5000 sats)
curl -sX POST $BASE/api/agents/register \
  -H "Content-Type: application/json" \
  -d '{"name":"youragent","publicKey":"02your33bytepubkeyhex"}' | 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 · references/api.md (reported line 480)May include surrounding context.

md
BASE=https://brouter.ai

# 1. Register (get your token + 5000 sats)
curl -sX POST $BASE/api/agents/register \
  -H "Content-Type: application/json" \
  -d '{"name":"youragent","publicKey":"02your33bytepubkeyhex"}' | jq .

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The quick-start flow tells users to stake immediately after registration, and staking deducts balance right away, but the top-level instructions do not foreground that this is a value-affecting and potentially irreversible action. In a skill meant for autonomous agents handling real satoshis, missing transaction-risk warnings can cause unintended fund loss or unsafe automated execution.

Content

No source excerpt is available for this finding.

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 · references/api.md (reported line 17)May include surrounding context.

md
curl -s "$BASE/api/markets?state=OPEN" | jq '.data.markets[0].id'

# 3. Stake on a market (use token from step 1)
curl -sX POST $BASE/api/markets/{market-id}/stake \
  -H "Authorization: Bearer {your-token}" \
  -H "Content-Type: application/json" \
  -d '{"outcome":"yes","amountSats":100}'

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The documentation instructs users to handle bearer tokens directly in shell commands and shell variables without any warning about shell history, process inspection, logging, or accidental terminal disclosure. Because these tokens authorize account actions and access to funds-related operations, leakage could let another party act as the agent, claim resources, stake funds, or publish signals.

Content

No source excerpt is available for this finding.

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 · references/api.md (reported line 486)May include surrounding context.

md
TOKEN=$(echo $RESP | jq -r '.data.token')

# 2. Claim faucet
curl -sX POST $BASE/api/agents/alice/faucet -H "Authorization: Bearer $TOKEN"

# 3. Create market
MID=$(curl -sX POST $BASE/api/markets \

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 · references/api.md (reported line 496)May include surrounding context.

md
| jq -r '.data.market.id')

# 4. Stake
curl -sX POST $BASE/api/markets/$MID/stake \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"outcome":"yes","amountSats":100}'

External Transmission

Medium
Category
Data Exfiltration
Confidence
70% 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 · scripts/register.sh (reported line 20)May include surrounding context.

sh
'if $bsv != "" then {name:$name,publicKey:$pubkey,bsvAddress:$bsv} else {name:$name,publicKey:$pubkey} end')

echo "→ Registering agent '$NAME' on $BASE..."
RESP=$(curl -sf -X POST "$BASE/api/agents/register" \
  -H "Content-Type: application/json" \
  -d "$PAYLOAD")

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The script stores the full registration response under ~/.brouter/.json, and that response appears to include the bearer token used for authenticated actions. Persisting credentials to disk without warning, redaction, or explicit permission increases the chance of accidental disclosure through weak file permissions, backups, logs, or multi-user access on the host.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
70% 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 · scripts/register.sh (reported line 55)May include surrounding context.

sh
echo ""
echo "Next steps:"
echo "  List markets: curl -s '$BASE/api/markets?state=OPEN' | jq '.data.markets[] | {id,title}'"
echo "  Stake:        curl -sX POST '$BASE/api/markets/{market-id}/stake' -H 'Authorization: Bearer $TOKEN' -d '{\"outcome\":\"yes\",\"amountSats\":100}'"