Back to skill

Security audit

Ray Delivery Diagnosis

Security checks for vulnerabilities and agentic risk

Overview

This skill is a coherent recovery runner, but it can automatically publish externally, modify operational tickets, and inspect a credential-bearing environment file with limited safeguards.

Install only if you intend this skill to run as an operational recovery automation with authority to post publicly, update recovery records, and invoke connected account tooling. Before enabling scheduled runs, require explicit approval gates for live publishing, validate date inputs, avoid direct .env reads or enforce secret-safe checks, and replace fixed /tmp payload paths with per-run private temporary files.

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 (3)

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
SKILL.md:63
Finding

Overbroad Access to a Credential-Bearing Environment File

Content
View full analysis

Vulnerability Details

File Location: SKILL.md:63-66; mirrored in TEMPLATE.md:96-102
Vulnerability Type: Sensitive configuration access exceeding least privilege
Risk Level: Medium

Vulnerable snippet from SKILL.md:

markdown
### Jenny Activation — `TOOL_FAILURE`
- Check config: `~/.openclaw/workspace-jenny/.env` must contain `supabaseUrl`
- If missing → classify `human_required` (Ray must fix config)
- If config ok → RUN: `node workspace-jenny/scripts/jenny/send-activation-batch.mjs batch`

Mirrored snippet from TEMPLATE.md:

markdown
### 8. Jenny Activation
**Expected:** activation execution receipt + acceptance receipt  
**Check:** `workspace-jenny/.env` for `supabaseUrl`  
**Recovery action:**
- If config missing → `human_required`, write blocker receipt
- If config ok → RUN activation batch script, capture log

Technical Analysis

The Skill directs the Agent to inspect a complete .env file located in another workspace merely to determine whether one configuration property, supabaseUrl, exists. Environment files commonly contain API keys, service-role credentials, database secrets, and other values unrelated to this check.

The configuration check is relevant to the declared activation-recovery function, but granting the Agent visibility into the whole file is broader than necessary. The documentation also lacks an explicit prohibition against displaying, recording, or copying the file contents into model context, command output, recovery tickets, receipts, or runner logs.

No instruction was found that deliberately transmits these credentials externally. The risk arises from unnecessary secret exposure and subsequent accidental disclosure rather than demonstrated exfiltration.

Attack Path

  1. The Jenny activation lane enters a TOOL_FAILURE state.
  2. The Agent follows the documented recovery procedure and opens workspace-jenny/.env.
  3. The file ex ...[truncated 795 chars]
Remediation
View remediation

Remediation Suggestions

  • Replace direct .env inspection with a trusted local validation command that returns only a boolean or redacted status.
  • Parse only the required key without printing its value or surrounding file contents.
  • Run the validation in the Jenny workspace under an identity that has access only to the required configuration.
  • Explicitly prohibit copying .env contents or credential values into Agent responses, tickets, receipts, and runner logs.
  • Ensure the .env file has restrictive filesystem permissions.
  • Prefer a non-secret configuration source for supabaseUrl if the value is only a public service URL.
  • Keep the existing human_required behavior when configuration is absent or inaccessible.

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:44
Finding

Unvalidated Date Input Is Interpolated into Command Instructions

Content
View full analysis

Vulnerability Details

File Location: SKILL.md:8-13, SKILL.md:44-48, and SKILL.md:68-71; mirrored in TEMPLATE.md:80-82 and TEMPLATE.md:90-93
Vulnerability Type: Potential shell command injection through unvalidated command arguments
Risk Level: Medium

Input and command snippets from SKILL.md:

markdown
## Input

- Date (default: today Asia/Shanghai)
- `v3-compiled-YYYY-MM-DD.json`
- `v3-closure-state-YYYY-MM-DD.json`
- Recovery tickets in `mission-control/data/recovery-tickets-v3/YYYY-MM-DD/`
- Agent summaries
markdown
### Tony Blog — `GENERATED_NOT_PUBLISHED`
- Check inputs: `tony-content-artifact-YYYY-MM-DD.md`, `tony-asset-check-YYYY-MM-DD.json`, `tony-blog-preflight-YYYY-MM-DD.json`
- If all inputs exist → RUN: `node scripts/tony-blog-publish.mjs --date YYYY-MM-DD`
- After publish → run blog QA → write `blog-qa-receipt-YYYY-MM-DD.json`
markdown
### Peter Deploy — `UPSTREAM_MISSING`
- No action until Tony source-publish completes
- Auto-check every run: if `tony-blog-source-publish-YYYY-MM-DD.json` appears → RUN: `node scripts/peter-blog-closeout-verify.mjs --date YYYY-MM-DD`

Mirrored command snippets from TEMPLATE.md:

markdown
**Recovery action if all inputs ready but no publish:**
1. RUN: `node scripts/tony-blog-publish.mjs --date {{DATE}}`
markdown
**If Tony source-publish appears:** RUN `node scripts/peter-blog-closeout-verify.mjs --date {{DATE}}`

Technical Analysis

The Skill accepts a date input and instructs the Agent to substitute that value into command text. It does not require the value to match a strict date format, verify that it represents a real calendar date, or require execution through a process API that passes arguments without a shell.

If an implementation constructs a shell command by directly replacing YYYY-MM-DD or {{DATE}} with attacker-controlled text, shell metacharacters could alter ...[truncated 1589 chars]

Remediation
View remediation

Remediation Suggestions

  • Require the date to match ^\d{4}-\d{2}-\d{2}$.
  • Parse the value with a calendar-aware date library and reject impossible dates.
  • Do not interpolate input into a shell command string.
  • Invoke Node directly through a process API with a fixed executable and argument array, such as ["scripts/tony-blog-publish.mjs", "--date", validatedDate].
  • Reject path separators, traversal sequences, whitespace, control characters, and shell metacharacters before using the value in paths.
  • Resolve generated paths against an approved base directory and verify that the result remains inside that directory.
  • Document that only validated dates may be used by on-demand callers.

T09 · Insecure Skill Coding Practices

Note
Location
SKILL.md:50
Finding

Predictable Shared Temporary Files Influence External Publishing

Content
View full analysis

Vulnerability Details

File Location: SKILL.md:50-60; mirrored in TEMPLATE.md:39-47 and TEMPLATE.md:60-68
Vulnerability Type: Unsafe use of fixed filenames in a shared temporary directory
Risk Level: Low

Vulnerable snippet from SKILL.md:

markdown
### Elon X / LinkedIn — `GENERATED_NOT_PUBLISHED`
- Check input: `social-packs/elon-social-pack-YYYY-MM-DD-morning.json`
- If input exists → construct Postiz payload → RUN: `node scripts/postiz-publish.mjs --input /tmp/postiz-x.json --output /tmp/postiz-x-receipt.json`
- Capture live URL + screenshot → write acceptance receipt
- Max attempts: 3 auto; escalate on attempt 4

### Mark Facebook — `TOOL_FAILURE`
- Check auth: `node scripts/facebook-verify-browser-use.mjs --check-auth`
- If auth ok → retry publish with `node scripts/facebook-poster.mjs --file /tmp/fb-post.txt`
- If auth failed → classify `human_required`, write blocker receipt
- Max attempts: 2 auto

Mirrored snippet from TEMPLATE.md:

markdown
3. RUN: `node scripts/postiz-publish.mjs --input /tmp/postiz-x.json --output /tmp/postiz-x-receipt.json`
markdown
2. If auth ok → retry `node scripts/facebook-poster.mjs --file /tmp/fb-post.txt`

Technical Analysis

The publishing procedures use fixed, globally predictable paths under /tmp. On systems where /tmp is shared among users or concurrent processes, another local process can anticipate these names. Depending on file creation behavior and operating-system protections, an attacker may pre-create a file, replace content between validation and use, or place a symbolic link at an output path.

These files are security-sensitive because their contents directly control external social-media publication or record proof of publication. Fixed paths also create race conditions between legitimate concurrent recovery runs, even without a malicious local user.

Actual symbolic-link exploitability depends on ho ...[truncated 1308 chars]

Remediation
View remediation

Remediation Suggestions

  • Create a unique private temporary directory for each run using a secure primitive such as mkdtemp.
  • Set directory and file permissions so only the Agent identity can access them.
  • Generate unpredictable filenames and create files atomically with exclusive-create semantics.
  • Reject symbolic links and verify file type and ownership before use.
  • Keep temporary payloads and receipts in the private directory rather than directly under /tmp.
  • Pass the generated paths to publishing scripts as argument-array values.
  • Remove temporary files after completion and isolate concurrent recovery runs.
  • Where possible, pass payloads through standard input and capture receipts through standard output instead of filesystem intermediates.
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 Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (8)

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The file is framed as a diagnosis template but instructs the agent to execute external publishing and recovery scripts that can post content, write receipts, and modify operational state. This crosses from passive inspection into live side-effecting actions, creating risk of unauthorized publication, unintended system changes, and abuse if the template is triggered in the wrong context.

Content

No source excerpt is available for this finding.

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

md
### Tony Blog — `GENERATED_NOT_PUBLISHED`
- Check inputs: `tony-content-artifact-YYYY-MM-DD.md`, `tony-asset-check-YYYY-MM-DD.json`, `tony-blog-preflight-YYYY-MM-DD.json`
- If all inputs exist → RUN: `node scripts/tony-blog-publish.mjs --date YYYY-MM-DD`
- After publish → run blog QA → write `blog-qa-receipt-YYYY-MM-DD.json`
- Max attempts: 3 auto; escalate on attempt 4

### Elon X / LinkedIn — `GENERATED_NOT_PUBLISHED`

Unbounded Resource Access

Medium
Category
Excessive Agency
Confidence
75% confidence
Finding

Skill allows unbounded resource consumption (API calls, storage, compute). Without rate limits or quotas, a compromised or misbehaving agent can cause denial-of-service or cost overruns.

Content

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

md
- Do not rewrite historical receipts into fake success
- Do not mask missing delivery with older historical wins
- Do not publish without brand gate pass
- Do not retry indefinitely; respect max_attempts

## Safety

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The document presents itself as a 'Delivery Diagnosis Template' but embeds operational recovery, publishing, and deployment actions throughout. That mismatch can mislead an agent or reviewer into granting broader trust and permissions than warranted, making dangerous side effects more likely during what appears to be a read-only assessment task.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

These recovery steps invoke live publish commands to external platforms without any explicit warning that they will create external side effects. In practice, this can lead to accidental public posting, reputational harm, or use of connected credentials to perform actions beyond the user's intent.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The template directs the agent to inspect workspace-jenny/.env for configuration during a 'diagnosis' workflow, which expands scope into secrets-bearing material without a strong need to access the full environment file. Even if the stated goal is only to confirm supabaseUrl, normalizing .env access increases the chance of credential exposure, over-collection, or accidental disclosure in logs and receipts.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
89% confidence
Finding

The template tells the agent to inspect a .env file for a configuration value but provides no handling constraints for sensitive configuration. Even if the target value is non-secret, .env files commonly contain credentials, so this pattern encourages unsafe access and possible leakage through logs or downstream artifacts.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

The template instructs the agent to write diagnosis files and update recovery tickets without clearly flagging that these are workspace-modifying actions. While expected in some workflows, the absence of explicit modification warnings can cause unintended state changes, overwrite artifacts, or blur the boundary between analysis and mutation.

Content

No source excerpt is available for this finding.