Back to skill

Security audit

WordPress Remote News Publisher

Security checks for vulnerabilities and agentic risk

Overview

The skill's WordPress publishing purpose is clear, but its SSH automation can modify a live site and has concrete implementation risks that should be reviewed before install.

Treat this as a Review install. Use it only with a dedicated non-root SSH user and key, enable SSH host key verification, remove the --allow-root example, replace fixed /tmp state with private per-run files, validate numeric IDs, and fix remote command argument handling before enabling cron-based publishing.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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 (4)

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/upload_media_remote.sh:24
Finding

SSH Host Authenticity Verification Is Disabled

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/publish_wp_remote.sh:100
Finding

Untrusted Values Are Interpolated into Remote Shell Commands

Content
View full analysis
/dev/null || { echo "WARNING: Failed to set featured image" >&2 } # --- Add Tags --- if [ -n "$TAGS" ]; then echo "Adding tags: $TAGS" # Split comma-separated tags and add individually IFS=',' read -ra TAG_ARRAY <<< "$TAGS" for tag in "${TAG_ARRAY[@]}"; do ssh $SSH_OPTS "$SSH_USER@$SSH_HOST" \ "wp post term add $POST_ID post_tag '$tag' \ --path='$REMOTE_PATH'" 2>/dev/null || true done fi # --- Add Yoast SEO Metadata --- if [ -n "$META_DESC" ]; then echo "Adding Yoast meta description..." ssh $SSH_OPTS "$SSH_USER@$SSH_HOST" \ "wp post meta update $POST_ID _yoast_wpseo_metadesc '$META_DESC' \ --path='$REMOTE_PATH'" 2>/dev/null || { echo "WARNING: Failed to set Yoast meta description" >&2 } fi if [ -n "$KEYWORD" ]; then echo "Adding Yoast focus keyword: $KEYWORD" ssh $SSH_OPTS "$SSH_USER@$SSH_HOST" \ "wp post meta update $POST_ID _yoast_wpseo_focuskw '$KEYWORD' \ --path='$REMOTE_PATH'" 2>/dev/null || { echo "WARNING: Failed to set Yoast focus keyword" >&2 } fi ``` The author ID and remote path are also inserted into the remotely interpreted heredoc at `scripts/publish_wp_remote.sh:72-85`: ```bash POST_ID=$(ssh $SSH_OPTS "$SSH_USER@$SSH_HOST" bash < /tmp/wp_title.txt python3 -c "import json; d=json.load(open('$REMOTE_ARTICLE_JSON')); print(d['content'], end='')" > /tmp/wp_content.txt python3 -c "i ...[truncated 2918 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/publish_wp_remote.sh:33
Finding

Predictable Shared Temporary Files Permit Local Tampering and Symlink Attacks

Content
View full analysis
&2 echo "Generate article data first using the article generation phase." >&2 exit 1 fi if [ ! -f /tmp/wp_media_id.txt ]; then echo "ERROR: Media ID file not found: /tmp/wp_media_id.txt" >&2 echo "Upload cover image first." >&2 exit 1 fi # Extract article data using Python TITLE=$(python3 -c "import json; d=json.load(open('$ARTICLE_JSON')); print(d['title'])") CONTENT=$(python3 -c "import json; d=json.load(open('$ARTICLE_JSON')); print(d['content'])") EXCERPT=$(python3 -c "import json; d=json.load(open('$ARTICLE_JSON')); print(d['excerpt'])") TAGS=$(python3 -c "import json; d=json.load(open('$ARTICLE_JSON')); print(','.join(d['tags']))") META_DESC=$(python3 -c "import json; d=json.load(open('$ARTICLE_JSON')); print(d['meta_desc'])") KEYWORD=$(python3 -c "import json; d=json.load(open('$ARTICLE_JSON')); print(d['keyword'])") MEDIA_ID=$(cat /tmp/wp_media_id.txt) ``` Related predictable writes include `scripts/upload_media_remote.sh:88`: ```bash echo "$MEDIA_ID" > /tmp/wp_media_id.txt ``` The downloader also writes a fixed metadata path at `scripts/download_cover.py:63-68`: ```python meta_path = '/tmp/cover_meta.txt' with open(meta_path, 'w') as f: f.write(f"Photo by {photographer_name} on Unsplash\n") f.write(f"URL: {unsplash_url}\n") f.write(f"Downloaded: {datetime.utcnow().isoformat()}Z\n") ``` ### Technical Analysis The workflow stores article data, media IDs, post IDs, and image metadata under fixed names in the globally shared `/tmp` directory. It does not create a private per-run directory, verify ownership, reject symbolic links, or atomically open files ...[truncated 1844 chars]
Remediation
View remediation

T08 · Insecure Dependencies

Note
Location
SKILL.md:277
Finding

Dependency Installation Guidance Is Unpinned and Non-Reproducible

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Taint TrackingDirect Taint Flow, Variable-Mediated Taint Flow, Credential Exfiltration Chain
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (19)

Tainted flow: 'headers' from os.environ.get (line 32, credential/environment) → requests.get (network output)

Critical
Category
Data Flow
Confidence
90% confidence
Finding

Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.

Content

Scanner excerpt · scripts/download_cover.py (reported line 37)May include surrounding context.

python
}
    
    try:
        response = requests.get(url, params=params, headers=headers, timeout=30)
        response.raise_for_status()
        data = response.json()
    except requests.exceptions.RequestException as e:

Credential Access

High
Category
Privilege Escalation
Confidence
90% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

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

md
|----------|-------------|----------|---------|
| `WP_SSH_HOST` | Remote server hostname or IP | Yes | `203.0.113.10` or `example.com` |
| `WP_SSH_USER` | SSH username on remote server | Yes | `deploy`, `www-data`, `wpcli` |
| `WP_SSH_KEY` | Absolute path to SSH private key | Yes | `/home/user/.ssh/id_ed25519_wp` |
| `WP_SSH_PORT` | SSH port (default: 22) | No | `22` |
| `WP_REMOTE_PATH` | Absolute path to WordPress installation | Yes | `/var/www/html/wordpress` |
| `WP_REMOTE_TMP` | Writable temp directory on remote | No | `/tmp` |

Credential Access

High
Category
Privilege Escalation
Confidence
90% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

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

md
|----------|-------------|----------|---------|
| `WP_SSH_HOST` | Remote server hostname or IP | Yes | `203.0.113.10` or `example.com` |
| `WP_SSH_USER` | SSH username on remote server | Yes | `deploy`, `www-data`, `wpcli` |
| `WP_SSH_KEY` | Absolute path to SSH private key | Yes | `/home/user/.ssh/id_ed25519_wp` |
| `WP_SSH_PORT` | SSH port (default: 22) | No | `22` |
| `WP_REMOTE_PATH` | Absolute path to WordPress installation | Yes | `/var/www/html/wordpress` |
| `WP_REMOTE_TMP` | Writable temp directory on remote | No | `/tmp` |

Credential Access

High
Category
Privilege Escalation
Confidence
90% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

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

md
|----------|-------------|----------|---------|
| `WP_SSH_HOST` | Remote server hostname or IP | Yes | `203.0.113.10` or `example.com` |
| `WP_SSH_USER` | SSH username on remote server | Yes | `deploy`, `www-data`, `wpcli` |
| `WP_SSH_KEY` | Absolute path to SSH private key | Yes | `/home/user/.ssh/id_ed25519_wp` |
| `WP_SSH_PORT` | SSH port (default: 22) | No | `22` |
| `WP_REMOTE_PATH` | Absolute path to WordPress installation | Yes | `/var/www/html/wordpress` |
| `WP_REMOTE_TMP` | Writable temp directory on remote | No | `/tmp` |

Credential Access

High
Category
Privilege Escalation
Confidence
90% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

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

md
|----------|-------------|----------|---------|
| `WP_SSH_HOST` | Remote server hostname or IP | Yes | `203.0.113.10` or `example.com` |
| `WP_SSH_USER` | SSH username on remote server | Yes | `deploy`, `www-data`, `wpcli` |
| `WP_SSH_KEY` | Absolute path to SSH private key | Yes | `/home/user/.ssh/id_ed25519_wp` |
| `WP_SSH_PORT` | SSH port (default: 22) | No | `22` |
| `WP_REMOTE_PATH` | Absolute path to WordPress installation | Yes | `/var/www/html/wordpress` |
| `WP_REMOTE_TMP` | Writable temp directory on remote | No | `/tmp` |

Credential Access

High
Category
Privilege Escalation
Confidence
90% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

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

bash
# 1. Generate a dedicated key pair (ed25519 recommended)
ssh-keygen -t ed25519 -f ~/.ssh/id_ed25519_wp \
    -C "openclaw-wp-publisher" -N ""

# 2. Copy public key to remote server

Credential Access

High
Category
Privilege Escalation
Confidence
90% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

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

bash
# 1. Generate a dedicated key pair (ed25519 recommended)
ssh-keygen -t ed25519 -f ~/.ssh/id_ed25519_wp \
    -C "openclaw-wp-publisher" -N ""

# 2. Copy public key to remote server

Credential Access

High
Category
Privilege Escalation
Confidence
90% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

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

bash
# 1. Generate a dedicated key pair (ed25519 recommended)
ssh-keygen -t ed25519 -f ~/.ssh/id_ed25519_wp \
    -C "openclaw-wp-publisher" -N ""

# 2. Copy public key to remote server

Credential Access

High
Category
Privilege Escalation
Confidence
90% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

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

ssh -i ~/.ssh/id_ed25519_wp -o BatchMode=yes
deploy@203.0.113.10 "wp --info"

4. (Optional) Restrict key in ~/.ssh/authorized_keys

command="wp --allow-root",no-port-forwarding,no-X11-forwarding
ssh-ed25519 AAAA... openclaw-wp-publisher

text

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
89% confidence
Finding

The authorized_keys restriction example uses command="wp --allow-root", which permits forced execution of WP-CLI with root privileges if the associated key is used. In the context of a skill that automates remote content publishing and file transfer, granting a key a root-capable command materially increases the blast radius of key compromise or misuse and can enable full site or server modification depending on WP-CLI capabilities.

Content

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

deploy@203.0.113.10 "wp --info"

4. (Optional) Restrict key in ~/.ssh/authorized_keys

command="wp --allow-root",no-port-forwarding,no-X11-forwarding
ssh-ed25519 AAAA... openclaw-wp-publisher

text

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill is user-invocable and scheduled to run automatically, and it performs state-changing actions on a remote WordPress instance, including draft creation and publication. Although the behavior is described later in the document, the top-level description does not provide a clear warning that running the skill will modify a remote site on a schedule, increasing the risk of accidental or uninformed 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 · scripts/download_cover.py (reported line 26)May include surrounding context.

python
sys.exit(1)
    
    # Request random photo from Unsplash
    url = 'https://api.unsplash.com/photos/random'
    params = {
        'query': query,
        'orientation': 'landscape',

Tainted flow: 'image_url' from requests.get (line 50, network input) → requests.get (network output)

Medium
Category
Data Flow
Confidence
83% confidence
Finding

The script performs a second network request to a URL taken directly from the first HTTP response without validating the hostname or scheme. If the upstream API response is malicious, compromised, or unexpectedly altered, this could turn into server-side request forgery behavior or allow downloads from unintended locations.

Content

Scanner excerpt · scripts/download_cover.py (reported line 51)May include surrounding context.

python
# Download the image
    try:
        image_url = data['urls']['regular']
        img_response = requests.get(image_url, timeout=60)
        img_response.raise_for_status()
        
        with open(output_path, 'wb') as f:

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The documentation says the script creates a draft WordPress post from article data, which implies the parsed title, content, and excerpt are used as post fields. However, at L77-L80 the WP-CLI command supplies literal "file:///tmp/..." strings to --post_title, --post_content, and --post_excerpt, so the created post content does not match the documented intent of publishing the article body from JSON.

Content

No source excerpt is available for this finding.

Unsafe Defaults

Medium
Category
Tool Misuse
Confidence
98% confidence
Finding

The script disables SSH host key verification with StrictHostKeyChecking=no, which makes it vulnerable to man-in-the-middle attacks during both scp and ssh operations. Because the script transfers content and then executes remote WP-CLI commands, an attacker who can intercept or impersonate the SSH host could capture data, alter published content, or cause commands to run on an attacker-controlled server.

Content

Scanner excerpt · scripts/publish_wp_remote.sh (reported line 23)May include surrounding context.

sh
-o StrictHostKeyChecking=no \
          -o BatchMode=yes \
          -o ConnectTimeout=15 \
          -o PasswordAuthentication=no"

# --- Input Validation ---
if [ -z "$SSH_HOST" ] || [ -z "$SSH_USER" ] || [ -z "$SSH_KEY" ]; then

Unsafe Defaults

Medium
Category
Tool Misuse
Confidence
98% confidence
Finding

The SSH options explicitly disable host key verification with StrictHostKeyChecking=no, making the SCP and SSH connections vulnerable to man-in-the-middle attacks. An attacker on the network could impersonate the remote host, receive the uploaded file, or influence the remote command execution context while the script trusts the connection automatically.

Content

Scanner excerpt · scripts/upload_media_remote.sh (reported line 23)May include surrounding context.

sh
# -o StrictHostKeyChecking=no: don't prompt about host keys
# -o BatchMode=yes: fail if password required (force key auth)
# -o ConnectTimeout=15: timeout for connection
# -o PasswordAuthentication=no: explicitly disable password auth
SSH_OPTS="-i $SSH_KEY -p $SSH_PORT \
          -o StrictHostKeyChecking=no \
          -o BatchMode=yes \

Unsafe Defaults

Medium
Category
Tool Misuse
Confidence
75% confidence
Finding

Tool defaults are unsafe or overly permissive (e.g. disabled TLS verification, no authentication, world-writable permissions). Unsafe defaults widen the attack surface.

Content

Scanner excerpt · scripts/upload_media_remote.sh (reported line 28)May include surrounding context.

sh
-o StrictHostKeyChecking=no \
          -o BatchMode=yes \
          -o ConnectTimeout=15 \
          -o PasswordAuthentication=no"

# --- Input Validation ---
IMAGE_PATH="${1:-}"

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

This code creates or overwrites /tmp/wp_post_id.txt, which is a file write affecting local system state. While the script logs success afterward, there is no earlier user-facing warning, prompt, or comment specifically disclosing that it will persist the created post ID to a temporary local file.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
86% confidence
Finding

The script writes sensitive workflow state to a fixed, predictable path in /tmp, which is a world-accessible shared directory on many systems. This can expose the media ID to other local users, enable symlink or clobbering issues, and causes undocumented local filesystem side effects that may be abused in multi-user or automated environments.

Content

No source excerpt is available for this finding.