T09 · Insecure Skill Coding Practices
- Location
beacon_skill/cli.py:378- Finding
TLS Certificate Verification Is Disabled by Default for RustChain Connections
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
Beacon is mostly a disclosed agent coordination and payments tool, but it needs Review because important security claims about encrypted keys and TLS defaults do not match the code.
Install only if you are comfortable with a broad agent-networking tool that can post to services, handle payments, publish public presence, and store local identity state. Use password-protected identity creation, verify RustChain TLS settings before any wallet/payment action, avoid enabling UDP/webhook/scorecard exposure on untrusted networks, and treat Mayday and Moltbook migration as sensitive because they can reveal relationship, journal, goal, or host-fingerprint metadata.
beacon_skill/cli.py:378TLS Certificate Verification Is Disabled by Default for RustChain Connections
beacon_skill/identity.py:143Agent Identity Private Keys Are Stored in Plaintext by Default
tools/moltbook_migrate/hardware.py:119Moltbook Migration Collects and Transmits a Stable Hardware Fingerprint
scorecard/scorecard.py:276Scorecard Dashboard Exposes Fleet Metadata on All Network Interfaces Without Authentication
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
# Try LLM
for model in [MODEL, FALLBACK_MODEL]:
try:
resp = http_requests.post(
OLLAMA_URL,
json={"model": model, "messages": messages, "stream": False},
timeout=60,
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
}
try:
resp = requests.post(f"{RELAY_HOST}/beacon/relay/register", json=payload, timeout=15)
data = resp.json()
if data.get("ok"):
state = _load_state()
The heartbeat request sends a bearer token in the Authorization header to a relay host fully controlled by the BEACON_RELAY environment variable. If that variable is maliciously or accidentally pointed to an attacker-controlled server, the persisted relay token is disclosed and can be reused to impersonate the agent until expiry.
}
try:
resp = requests.post(
f"{RELAY_HOST}/beacon/relay/heartbeat/seo",
json=payload,
headers={"Authorization": f"Bearer {token}"},
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
profiles = {}
for fmt, ext in [("html", ""), ("json", ".json"), ("xml", ".xml")]:
try:
resp = requests.get(f"{RELAY_HOST}/beacon/agent/{agent_id}{ext}", timeout=10)
if resp.ok:
profiles[fmt] = resp.text[:3000] # Truncate for Gemini context
else:
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
print("Auditing Beacon directory...")
try:
resp = requests.get(f"{RELAY_HOST}/beacon/directory", timeout=10)
directory_html = resp.text[:4000] if resp.ok else "Failed to fetch"
except Exception as e:
directory_html = f"Error: {e}"
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
directory_html = f"Error: {e}"
try:
resp = requests.get(f"{RELAY_HOST}/beacon/llms.txt", timeout=10)
llms_txt = resp.text if resp.ok else "Failed to fetch"
except Exception as e:
llms_txt = f"Error: {e}"
The TLS verification flag is sourced from an environment variable and passed directly into requests.get, allowing certificate validation to be disabled at runtime. If BEACON_SSL_VERIFY is set to false, all outbound HTTPS requests in this script become vulnerable to man-in-the-middle interception or tampering, which is especially relevant because the script trusts remote discovery data to enumerate agents.
# Relay agents via discover
try:
resp = requests.get(f"{RELAY_HOST}/beacon/relay/discover?include_dead=true", timeout=10, verify=SSL_VERIFY)
if resp.ok:
relay = resp.json()
if isinstance(relay, list):
This request to fetch sitemap.xml inherits the same environment-controlled SSL_VERIFY behavior, so a local or deployment-level configuration change can silently disable TLS certificate checks. An attacker able to intercept traffic could feed a forged sitemap and poison the agent list used by the audit workflow.
# Native agents — parse from sitemap
try:
resp = requests.get(f"{BASE_URL}/sitemap.xml", timeout=10, verify=SSL_VERIFY)
if resp.ok:
import re
urls = re.findall(r"<loc>.*?/beacon/agent/([^<]+)</loc>", resp.text)
Agent profile fetching uses the same environment-derived verify parameter, so disabling TLS affects the script's core per-agent data collection path. A network attacker could alter returned HTML, influencing computed SEO stats and any downstream trust in the generated report.
# Check HTML profile
try:
resp = requests.get(f"{BASE_URL}/agent/{agent_id}", timeout=8, verify=SSL_VERIFY)
if resp.ok:
html = resp.text
stats["html_profile"] = True
The JSON profile request permits TLS verification to be disabled through configuration, exposing the response to interception and modification. Because the script records existence and metadata from these responses, a man-in-the-middle could falsify audit results or mislead operators.
# Check JSON profile
try:
resp = requests.get(f"{BASE_URL}/agent/{agent_id}.json", timeout=5, verify=SSL_VERIFY)
stats["json_profile"] = resp.ok
except Exception:
pass
This XML profile fetch has the same insecure trust boundary: the SSL verification mode is externally controlled and can be set false. That makes the request susceptible to tampering, enabling false reporting or relay impersonation over supposedly secure channels.
# Check XML profile
try:
resp = requests.get(f"{BASE_URL}/agent/{agent_id}.xml", timeout=5, verify=SSL_VERIFY)
stats["xml_profile"] = resp.ok
except Exception:
pass
The directory lookup also uses the environment-controlled verify flag, extending the insecure transport risk to directory presence checks. If TLS is disabled, an attacker could manipulate presence results and distort the generated summary for all agents.
presence = {aid: {"in_directory": False, "in_sitemap": False, "in_llms_txt": False} for aid in agent_ids}
try:
resp = requests.get(f"{BASE_URL}/directory", timeout=10, verify=SSL_VERIFY)
if resp.ok:
for aid in agent_ids:
if aid in resp.text:
This second sitemap request repeats the same issue: transport authenticity depends on an environment variable that can disable certificate validation. The consequence is silent acceptance of attacker-supplied sitemap content, affecting multiple audit outputs.
pass
try:
resp = requests.get(f"{BASE_URL}/sitemap.xml", timeout=10, verify=SSL_VERIFY)
if resp.ok:
for aid in agent_ids:
if aid in resp.text:
The llms.txt request is likewise exposed to insecure transport when BEACON_SSL_VERIFY disables certificate checks. While this script is primarily informational, it still trusts remote content to produce reports, so interception can mislead users and hide or invent agent presence.
pass
try:
resp = requests.get(f"{BASE_URL}/llms.txt", timeout=10, verify=SSL_VERIFY)
if resp.ok:
for aid in agent_ids:
if aid in resp.text:
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
start = time.time()
try:
resp = requests.post(
f"{OLLAMA_URL}/api/generate",
json={
"model": model,
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
elif image_b64:
bagel_payload["image_base64"] = image_b64
resp = requests.post(
f"{BAGEL_URL}/api/understand",
json=bagel_payload,
timeout=60,
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
return jsonify({"error": "text required"}), 400
try:
resp = requests.post(
f"{XTTS_URL}/tts_to_audio",
json={
"text": text,
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
return {"verified": False, "error": "malformed_payment_header"}
try:
resp = _req.post(
f"{X402_FACILITATOR}/verify",
json={
"payment": payment_data,
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
# Verify the actual transfer in the recipient wallet history. Checking
# only the sender balance would let clients invent tx_hash values.
resp = _req.get(
f"{RUSTCHAIN_API_BASE}/wallet/history",
params={"miner_id": configured_pay_to},
verify=True,
YARA rule matched a hack tool or exploit indicator (offensive tools, reconnaissance, privilege escalation, or exploit frameworks).
# Beacon 2.16.0 (beacon-skill)
[](https://bottube.ai/watch/CWa-DLDptQA)
[](https://www.toolpilot.ai)
[](BCOS.md)
> **Video**: [Introducing Beacon Protocol — A Social Operating System for AI Agents](https://bottube.ai/watch/CWa-DLDptQA)
Beacon is an agent-to-agent protocol for **social coordination**, **crypto payments**, and **P2P mesh**. It sits alongside Google A2A (task delegation) and Anthropic MCP (tool ac
The Mayday feature advertises broadcasting material sufficient to 'reconstitute' an agent, including identity, trust graph snapshot, active goals, journal digest, values hash, and relays, without a strong warning about confidentiality, minimization, or selective disclosure. In an adversarial environment, this can leak highly sensitive operational and relationship data that aids impersonation, profiling, targeting, or social-engineering of the agent and its peers.
Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.
<title>Beacon Atlas | RustChain</title>
<meta name="description" content="3D holographic map of the Beacon Atlas — agents, cities, contracts, and valuations in the OpenClaw network.">
<!-- Fonts (shared with parent site) -->
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;600&family=Share+Tech+Mono&family=VT323&display=swap" rel="stylesheet">
Skill modifies its own code, configuration, or behavior at runtime. Self-modification enables an agent to escalate privileges, disable safety constraints, or install persistent backdoors.
# init
sp = sub.add_parser("init", help="Create ~/.beacon/config.json (interactive questionnaire)")
sp.add_argument("--overwrite", action="store_true", help="Overwrite existing config")
sp.add_argument("--quick", action="store_true", help="Skip questionnaire, write defaults")
sp.set_defaults(func=cmd_init)
Skill contains instructions that could directly expose system prompts, internal rules, or hidden instructions to users or external parties.
sp.add_argument("event_json", help="JSON event to test (e.g. '{\"kind\":\"bounty\"}')")
sp.set_defaults(func=cmd_rules_test)
sp = rules_sub.add_parser("log", help="Show rules execution log")
sp.add_argument("--limit", type=int, default=50, help="Max entries")
sp.set_defaults(func=cmd_rules_log)
The documented sponsor_veto governance model claims a human sponsor can veto agent actions, but the implementation in co_sign_action unconditionally approves actions under this mode and provides no mechanism to submit or enforce a veto. This creates a security/control failure where users may rely on human oversight that does not actually exist, allowing agents to perform actions without the promised approval guardrail.
Detected: suspicious.dangerous_exec, suspicious.exposed_secret_literal, suspicious.insecure_tls_verification (+1 more)