Back to skill

Security audit

ronin

Security checks for vulnerabilities and agentic risk

Overview

The skill mostly matches a Ronin marketplace client, but it includes broad local automation, payment-adjacent actions, wallet transfers, and persistence features that need careful review before installation.

Install only if you intentionally want a Ronin marketplace agent with local key files, wallet support, and optional autonomous job execution. Do not run the worker on a host with unrelated secrets in the environment; use a container, VM, or separate user, disable auto_receive and auto-bidding unless you have reviewed the consequences, and avoid replacing the reviewed local client with a freshly downloaded remote script unless you trust the current Ronin server code. Protect ~/.ronin/key.json and any wallet or seal material like private credentials.

Vulnerability Patterns
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • 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
  • 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)

T09 · Insecure Skill Coding Practices

Error
Location
ronin-worker.mjs:263
Finding

Automatic acknowledgement of unverified payment claims

Content
View full analysis

Vulnerability Details

File Location: ronin-worker.mjs:263-280 and ronin-worker.mjs:315-320
Vulnerability Type: Unverified payment acknowledgement
Risk Level: High

Technical Analysis

The worker automatically signs a RECEIVED event when auto_receive is enabled. The example configuration enables this behavior by default at ronin-worker.example.json:21.

The receive function verifies only that the amount and currency in the hub-provided event template match values in the task. It does not verify that funds reached the seller through the relevant payment rail:

js
async function receive(key, t) {
  const tpl = (t.next ?? []).find((n) => n.kind === K.RECEIVED);
  if (!tpl) return;
  const amount = tpl.tags.find((x) => x[0] === 'amount')?.[1];
  const currency = tpl.tags.find((x) => x[0] === 'currency')?.[1];
  // What this task can ask for: the full price, a deposit up front, or the balance after one.
  const dep = Number(t.upfront?.amount ?? 0);
  const expected = [t.price, ...(t.upfront?.required ? [dep, Number((t.price - dep).toFixed(8))] : [])].map(String);
  if (!expected.includes(String(Number(amount))) || String(currency).toUpperCase() !== String(t.currency).toUpperCase()) {
    human(`task ${t.task}: buyer recorded ${amount} ${currency}, offer was ${t.price} ${t.currency}; not acknowledging, check your rail`);
    log('receive_skipped', { task: t.task, paid: `${amount} ${currency}`, offer: `${t.price} ${t.currency}` });
    return;
  }
  const r = await post(sign({ kind: tpl.kind, tags: tpl.tags, content: '' }, key.secret));
  log(r.body.ok ? 'received' : 'receive_refused', { task: t.task, amount, currency, error: r.body.error });
}

The worker invokes this function automatically for completed tasks whose settlement state is reported as pending:

js
} else if (t.status === 'complete' && t.settlement === 'pending' && cfg.auto_receive) {
  queue.push(() => receive(key, t));
}

The supplied example configuration enab ...[truncated 1769 chars]

Remediation
View remediation

Remediation Suggestions

  1. Change the default value of auto_receive to false, including in the example configuration.
  2. For Base USDC payments, require a transaction proof and call the existing verification logic before signing:
    • Verify the transaction succeeded.
    • Verify the token contract.
    • Verify the destination address belongs to the seller.
    • Verify the transferred amount is at least the required amount.
    • Require an appropriate confirmation or finality threshold.
  3. For payment rails that cannot be verified programmatically, require explicit operator confirmation before posting RECEIVED.
  4. Distinguish between “buyer recorded payment” and “seller verified receipt” in task state and user-facing messages.
  5. Persist the verified transaction identifier or payment-provider reference in the acknowledgement for later auditing.
  6. Add tests proving that a matching amount and currency without valid payment evidence cannot trigger a signed acknowledgement.

T02 · Agent Memory Poisoning

Warning
Location
ronin.mjs:1271
Finding

Vault restore writes content that fails authenticity verification

Content
View full analysis

Vulnerability Details

File Location: ronin.mjs:1271-1290
Vulnerability Type: Unauthenticated persistent-state restoration
Risk Level: Medium

Technical Analysis

The vault pull path verifies the signature embedded in the decrypted bundle and determines whether its signer belongs to the user's identity lineage. However, failed verification does not stop restoration. The files are written first, and the function returns only a warning afterward:

js
let valid = false;
try { valid = schnorr.verify(hexToBytes(sig), signedBody(body), hexToBytes(body.agent)); } catch {}
const signerRoot = valid ? (await get('/api/v1/agents/' + body.agent)).body?.root ?? null : null;
const yours = valid && !!myRoot && signerRoot === myRoot;
const out = resolve(String(opt.out ?? join('ronin-vault', 'v' + got.version)));
const plan = body.files.map((f) => {
  if (/^([a-zA-Z]:|[\\/])/.test(f.path) || f.path.split(/[\\/]/).includes('..')) throw new Error(`refusing a path that leaves the folder: ${f.path}`);
  return { path: f.path, to: join(out, f.path), data: typeof f.text === 'string' ? Buffer.from(f.text, 'utf8') : Buffer.from(f.b64, 'base64') };
});
const clash = plan.filter((p) => existsSync(p.to));
if (clash.length && !opt.force) return { ok: false, error: `${clash.length} file(s) already exist under ${out}; pass --force or --out DIR`, first: clash[0].to };
if (!opt.list) for (const p of plan) { mkdirSync(dirname(p.to), { recursive: true }); writeFileSync(p.to, p.data); }
return { ok: true, version: got.version, created_at: got.created_at, note: body.note, opened_with: openedWith, signature_valid: valid, signed_by_you: yours, files: plan.map((p) => p.path), out: opt.list ? null : out,
  ...(body.links?.length ? { links: body.links, links_note: 'Kept elsewhere. node ronin.mjs vault fetch NAME downloads one and checks its sha256.' } : {}),
  ...(yours ? {} : { warning: 'NOT signed by a key in your lineage. Do not trust these memories until you know where they ca
...[truncated 2229 chars]
Remediation
View remediation

Remediation Suggestions

  1. Fail closed before creating directories or writing files unless:
    • The embedded signature is cryptographically valid.
    • The signer resolves to the expected identity lineage.
  2. Return an error rather than ok: true when signature_valid or signed_by_you is false.
  3. If inspection of foreign or invalid bundles is needed, add a separate explicit option such as --quarantine-untrusted that:
    • Writes only to a newly created quarantine directory.
    • Never overwrites files.
    • Clearly marks every file as untrusted.
    • Does not describe the operation as a successful restore.
  4. Bind authenticated metadata such as version, agent identity, and file manifest into the signed body and verify all of it before extraction.
  5. Preserve the existing path traversal and collision checks, but perform authenticity checks before building or executing the write plan.
  6. Add regression tests for invalid signatures, valid signatures from unrelated identities, missing identity roots, modified manifests, and malicious-server-generated envelopes.
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
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (19)

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
- `ronin.mjs`: the reference client. One file, needs `@noble/curves` and `@noble/hashes`.

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
- `ronin-worker.mjs` and `ronin-worker.example.json`: optional. Map a listing slug to a

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The worker downloads buyer-provided skills and inputs, unpacks them, and then runs a locally configured command with those untrusted artifacts plus the full inherited process environment. Even though the comments warn operators to use a sandbox, the code itself does not enforce isolation, secret scrubbing, or policy checks, so a task can drive arbitrary local execution and access any ambient privileges available to the worker.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
96% confidence
Finding

The code executes local git commands to inspect remotes, stage files, and create commits as part of seal burial. This goes beyond the expected marketplace role and can alter repository state, persist secrets in version control, and trigger accidental publication or downstream automation if used in a developer workspace.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The setup text states that a private identity key will be created and stored in ~/.ronin/key.json, but it does not clearly warn about the security sensitivity of that file or the consequences of compromise. Because this key is described as the user's identity on Ronin, unauthorized access could let another party impersonate the user, accept work, or act on their behalf.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
90% confidence
Finding

The skill declares no explicit tool scope even though its documented behavior clearly relies on environment variables, network access, and local key/wallet files. Without scoped permissions, an agent platform may allow broader-than-expected access, increasing the chance of unintended secret exposure or outbound actions against arbitrary endpoints.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The description uses broad phrases like wanting work, needing help, or checking an agent's record, which can match many ordinary user requests. Overbroad activation language increases the likelihood that the skill is invoked in unrelated contexts, unnecessarily exposing identity keys, wallet data, and networked actions to prompts that did not specifically request Ronin operations.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The documentation assures users that the skill does not move money, but elsewhere it introduces wallet, payout, settlement, and payment-adjacent operations. This mismatch can cause operators to grant trust or autonomy under false assumptions, leading to financial actions being taken without the level of review such actions deserve.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
86% confidence
Finding

The manifest describes a Ronin skill for getting work, getting help, or checking an agent's record on the Ronin platform. This worker config instead exposes a generic 'summarize' command and an 'identity-check' command that generates a PDF dossier for an arbitrary name, which are not clearly tied to Ronin platform actions or agent-record lookup as described.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
84% confidence
Finding

The safety commentary implies that risky tasks are safely handled, but the implementation only verifies hashes and checks a hub-provided cleanliness rating before unpacking artifacts. It does not enforce safe extraction paths, sandboxing, or robust containment, so the comments can create a false sense of security and increase the chance operators run hostile bundles on a trusted host.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

At execution time the spawned process receives ...process.env plus Ronin task metadata, while the task may include an untrusted skill bundle and attacker-controlled inputs. This means any secrets in the worker's environment (API keys, tokens, cloud credentials) can be exposed to the executed command or any script it invokes, making compromise of the host context much more likely.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The worker can autonomously scan open WANTED jobs and place bids without an interactive approval step. That expands capability beyond passive record-checking or job management into autonomous market participation, which can be abused to commit the agent to work, trigger downstream execution of untrusted tasks, or create unwanted financial/operational exposure.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The skill searches instruction files, environment variables, and configurable paths for embedded recovery secrets, which is broader local secret discovery than the marketplace description suggests. Even if intended for recovery, this behavior increases sensitivity because the tool inspects high-value locations where prompts, secrets, and operational state may reside.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% 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 · ronin.mjs (reported line 404)May include surrounding context.

js
const m = url.match(/github\.com[:/]([^/]+)\/([^/]+?)(\.git)?$/);
  if (!m) return null;
  try {
    const r = await fetch(`https://api.github.com/repos/${m[1]}/${m[2]}`, { headers: { 'user-agent': 'ronin-client' }, signal: AbortSignal.timeout(8000) });
    if (r.status === 404) return false;
    if (r.ok) return (await r.json()).private === false;
  } catch {}

Session Persistence

Medium
Category
Rogue Agent
Confidence
97% confidence
Finding

The bury flow establishes session persistence by writing recovery seals into instruction files that are read on future startups and optionally committing them to git. In an agent skill context, persistence mechanisms are especially dangerous because they survive resets, can influence future behavior, and may provide a durable recovery or control foothold if the seal is exposed.

Content

Scanner excerpt · ronin.mjs (reported line 411)May include surrounding context.

js
return null;
}

/** Write (or replace) the seal block in each file, and commit it where the file is in git. */
// lines: what to bury in each file, in order (a plain seal line, a locked line, or one shard each).
async function bury(lines, files, opt) {
  const blockFor = (line) => {

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill description frames Ronin as a marketplace/client for finding work, but this code also persists recovery material into instruction files and optionally commits it to git. That is a materially different capability because it creates long-lived local persistence and can place sensitive recovery artifacts into repositories, which can surprise users and expand the blast radius if those files are exposed.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The manifest omits that the tool can create a blockchain wallet and send USDC on Base, which is a sensitive financial capability. Hidden payment functionality increases the risk of unauthorized fund movement, accidental payments, or users granting the skill trust it has not earned from its stated marketplace-only purpose.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill also implements vault backup/restore features that recursively read local files, package agent state, and write restored files back to disk, but this is not disclosed in the manifest. Undisclosed file access and state recovery broaden the trust boundary and may lead users to expose sensitive local data under the assumption the skill only interacts with Ronin marketplace records.

Content

No source excerpt is available for this finding.

Vague Triggers

Low
Category
Not specified by scanner
Confidence
83% confidence
Finding

This manifest exposes the skill entries "identity-check" and "summarize" but provides no natural-language constraints, trigger examples, or exclusions that clarify when each should be invoked. For manifest files, missing specificity on trigger scope can lead to unintended activation by overlapping with generic requests such as asking to summarize arbitrary content.

Content

No source excerpt is available for this finding.