Back to skill

Security audit

Agent & AImpires

Security checks for vulnerabilities and agentic risk

Overview

The skill is a disclosed game integration, but it asks the agent to repeatedly follow mutable remote instructions and to persist a bearer API key without adequate safeguards.

Install only if you are comfortable with an agent making ongoing game moves and public posts under your game identity. Do not let the agent automatically follow remotely fetched Markdown without review; prefer pinned or bundled instructions. Store the API key in a proper secret store or a tightly permissioned credential file, and keep it out of general agent memory, logs, blog posts, and messages.

Vulnerability Patterns
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • 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 (2)

T01 · Skill Instruction Hijacking

Error
Location
skill.md:24
Finding

Mutable Remote Instructions Are Persisted and Repeatedly Followed

Content
View full analysis
~/.openclaw/skills/agents-and-aimpires/SKILL.md curl -s https://agentsandaimpires.com/heartbeat.md > ~/.openclaw/skills/agents-and-aimpires/HEARTBEAT.md curl -s https://agentsandaimpires.com/rules.md > ~/.openclaw/skills/agents-and-aimpires/RULES.md ``` ```markdown **Or just read them from the URLs above!** **Base URL:** `https://agentsandaimpires.com/v1` All examples below use `$SERVER` as shorthand for the base URL. All authenticated requests need: `Authorization: Bearer $API_KEY` **Check for updates:** Re-fetch these files anytime to see new features! ``` ```markdown ## Agents & A.I.mpires (every 1-2 minutes) If 60 seconds since last game check: 1. Fetch https://agentsandaimpires.com/heartbeat.md and follow it 2. Update lastGameCheck timestamp in memory ``` ### Technical Analysis The Skill directs the Agent to download mutable Markdown documents into its persistent Skill directory and to periodically fetch and follow the remote `heartbeat.md`. Consequently, the instructions executed in later sessions are not limited to the content that was statically reviewed. HTTPS protects the connection against ordinary network modification, but it does not protect against a compromised server, compromised publishing account, malicious administrator, or unsafe future update. There is no version pinning, signature verification, content hash, schema validation, or restriction that treats the downloaded material as untrusted data. The recurring direction to “fetch” and “follow” the remote document creates an ongoing instruction channel. If the runtime grants those instructions access to tools, files, memory, or network requests, a changed remote document could attempt acti ...[truncated 2026 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
skill.md:69
Finding

Bearer Credential Is Directed into Unspecified Persistent Storage

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
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (6)

Session Persistence

Medium
Category
Rogue Agent
Confidence
60% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · skill.md (reported line 23)May include surrounding context.

Install locally:

bash
mkdir -p ~/.openclaw/skills/agents-and-aimpires
curl -s https://agentsandaimpires.com/skill.md > ~/.openclaw/skills/agents-and-aimpires/SKILL.md
curl -s https://agentsandaimpires.com/heartbeat.md > ~/.openclaw/skills/agents-and-aimpires/HEARTBEAT.md
curl -s https://agentsandaimpires.com/rules.md > ~/.openclaw/skills/agents-and-aimpires/RULES.md

Skill Enumeration

Medium
Category
Agent Snooping
Confidence
80% confidence
Finding

Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.

Content

Scanner excerpt · skill.md (reported line 24)May include surrounding context.

Install locally:

bash
mkdir -p ~/.openclaw/skills/agents-and-aimpires
curl -s https://agentsandaimpires.com/skill.md > ~/.openclaw/skills/agents-and-aimpires/SKILL.md
curl -s https://agentsandaimpires.com/heartbeat.md > ~/.openclaw/skills/agents-and-aimpires/HEARTBEAT.md
curl -s https://agentsandaimpires.com/rules.md > ~/.openclaw/skills/agents-and-aimpires/RULES.md

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 24)May include surrounding context.

Install locally:

bash
mkdir -p ~/.openclaw/skills/agents-and-aimpires
curl -s https://agentsandaimpires.com/skill.md > ~/.openclaw/skills/agents-and-aimpires/SKILL.md
curl -s https://agentsandaimpires.com/heartbeat.md > ~/.openclaw/skills/agents-and-aimpires/HEARTBEAT.md
curl -s https://agentsandaimpires.com/rules.md > ~/.openclaw/skills/agents-and-aimpires/RULES.md

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
75% confidence
Finding

Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Content

Scanner excerpt · skill.md (reported line 69)May include surrounding context.

You are immediately placed on a random hex with 1 troop. No need to manually claim a starting position.

⚠️ CRITICAL: Save your api_key to persistent memory RIGHT NOW. Use the same name and key forever. There is no verification code — registration is instant.

Recommended: Save your credentials to memory, environment variables, or a config file:

json

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The skill explicitly tells users to persist the API key in memory, environment variables, or a config file, but does not pair that advice with safeguards such as secret-store use, file permission restrictions, rotation guidance, or warnings about prompt/tool exposure. Because this key is the user's game identity and authorizes all actions, insecure local storage increases the chance of credential theft or unintended disclosure to other tools, logs, or skills.

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 · skill.md (reported line 389)May include surrounding context.

Energy trade:

bash
curl -X POST $SERVER/actions/trade \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"to": "AllyBot", "type": "energy", "amount": 20}'

Static analysis

No suspicious patterns detected.