Back to skill

Security audit

Publish-Mate

Security checks for vulnerabilities and agentic risk

Overview

This is a coherent news auto-publisher, but it needs Review because it can publish live CMS content while using unsafe TLS handling and broad URL fetching.

Before installing, require HTTPS with normal certificate validation, avoid HTTP CMS URLs, use a dedicated low-privilege WordPress application password, default first runs to preview or draft, and restrict news/image/custom API URLs to trusted public destinations.

Vulnerability Patterns
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (2)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/auto_publish.py:506
Finding

WordPress credentials transmitted over connections with disabled TLS verification

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/fetch_news.py:72
Finding

Unrestricted URL fetching enables server-side request forgery

Content
View full analysis
str: """ Fetch full article content from URL using simple readability-like extraction. Returns cleaned text content. """ try: headers = { "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36", "Accept": "text/html,application/xhtml+xml", } req = Request(url, headers=headers) with urlopen(req, timeout=timeout) as response: html = response.read().decode("utf-8", errors="ignore") ``` Feed-controlled article links reach this function at `scripts/fetch_news.py:220-225`: ```python if len(content) < 500 and link: # Try to fetch full article if content is too short logger.info(f"Fetching full article: {title[:50]}...") full_content = fetch_full_article(link) if full_content and len(full_content) > len(content): content = full_content ``` The same design is used for feed- and API-provided image URLs in the integrated pipeline: ```python rss_image = article.get("image_url", "") if rss_image and images_config.get("fallback_from_rss", True): logger.info(f"Using RSS image: {rss_image[:80]}...") local_path = download_image(rss_image, article["title"]) if local_path: return local_path ``` ### Technical Analysis URLs from configuration, RSS entries, API responses, redirects, and the `fetch_image.py --url` command-line option are passed directly to `urllib.request.urlopen`. The implementation does not: - Restrict requests ...[truncated 2847 chars]
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
  • Taint TrackingDirect Taint Flow, Variable-Mediated Taint Flow, Credential Exfiltration Chain
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (30)

Tainted flow: 'req' from os.environ.get (line 286, credential/environment) → urllib.request.urlopen (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/auto_publish.py (reported line 69)May include surrounding context.

python
}
    req = Request(url, headers=headers)
    try:
        with urlopen(req, timeout=timeout) as resp:
            return resp.read()
    except Exception:
        # Retry with SSL context

Tainted flow: 'req' from os.environ.get (line 457, credential/environment) → urllib.request.urlopen (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/auto_publish.py (reported line 76)May include surrounding context.

python
try:
            import certifi
            ctx = ssl.create_default_context(cafile=certifi.where())
            with urlopen(req, timeout=timeout, context=ctx) as resp:
                return resp.read()
        except ImportError:
            raise

Tainted flow: 'req' from os.environ.get (line 286, credential/environment) → urllib.request.urlopen (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/auto_publish.py (reported line 269)May include surrounding context.

python
}
    req = Request(url, headers=headers)
    try:
        with urlopen(req, timeout=15) as resp:
            data = json.loads(resp.read())
            results = data.get("results", [])
            if results:

Tainted flow: 'req' from os.environ.get (line 286, credential/environment) → urllib.request.urlopen (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/auto_publish.py (reported line 288)May include surrounding context.

python
}
    req = Request(url, headers=headers)
    try:
        with urlopen(req, timeout=15) as resp:
            data = json.loads(resp.read())
            results = data.get("results", [])
            if results:

Tainted flow: 'req' from os.environ.get (line 457, credential/environment) → urllib.request.urlopen (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/auto_publish.py (reported line 424)May include surrounding context.

python
"Authorization": self.auth_header,
                }
            )
            with urlopen(req, timeout=8) as resp:
                if resp.status == 200:
                    self.use_rest_route = False
                    logger.info("API: /wp-json/ style")

Tainted flow: 'req' from os.environ.get (line 457, credential/environment) → urllib.request.urlopen (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/auto_publish.py (reported line 458)May include surrounding context.

python
for attempt in range(retries + 1):
            try:
                req = Request(url, data=body, headers=headers, method=method)
                with urlopen(req, timeout=30) as resp:
                    return json.loads(resp.read().decode("utf-8"))
            except (URLError, ConnectionError, OSError) as e:
                if attempt < retries:

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

The declared description describes an end-to-end pipeline: fetching global news from RSS/API sources, automatically generating articles with images, and publishing them. The supplied code chunk implements only the publishing stage. It reads article data from a local JSON file, optionally does a dry run, uploads an existing image file, resolves/creates WordPress categories and tags, and publishes to WordPress or a configurable custom CMS endpoint. There is no logic for fetching news from RSS/API sources, scraping, summarization, article writing, or image generation. Therefore the description materially overstates what this code chunk actually does, making it a mismatch.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The image upload path explicitly disables TLS hostname verification and certificate validation before sending WordPress Basic Auth credentials and media content. This enables man-in-the-middle interception or credential theft on any hostile network path and is especially dangerous because the skill performs authenticated publishing to a CMS.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The code silently disables TLS verification for WordPress media uploads without any user warning or compensating control. Because Basic Auth credentials are used, an attacker intercepting traffic could capture credentials, alter uploaded content, or hijack the publishing workflow.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The README prominently markets automatic fetching, image generation, and publishing to a live WordPress or CMS target, but it does not clearly warn that invoking the skill may immediately create public posts and upload media to the user's site. In an automation context, that omission can cause unintended public content publication, reputational damage, and hard-to-reverse site changes, especially because users may assume a dry-run or draft-first workflow.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

Documenting publishing.status with a default of publish normalizes immediate live publication without emphasizing that this makes generated content publicly visible right away. Because this skill automates both content generation and CMS posting, a risky default materially increases the chance of accidental publication of low-quality, incorrect, or policy-violating content.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
93% confidence
Finding

The skill declares no explicit tool scope even though its documented behavior requires environment access, file reads/writes, and outbound network actions. In an agent setting, missing scope declarations reduce transparency and guardrails, making it easier for the skill to perform sensitive actions like publishing content or reading secrets without clear user review.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The default command performs live network publishing to a user CMS, but the skill does not present a strong up-front warning or require confirmation before making external changes. This raises the risk of accidental content publication, unintended media uploads, and remote state changes triggered by a casual invocation of the main command.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The sample config sets "language": "zh", which imposes a specific locale in the skill's natural-language behavior. The file does not explain that this is region-specific or present it as an explicit user choice in the example, creating a language policy concern.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

This is a markdown file, so SQP-2 applies to omissions in user-facing safety warnings. The section shows a plaintext API_KEY in ~/.openclaw/openclaw.json but does not warn readers that credentials are sensitive, should be protected, and may be exposed via file sharing, backups, or source control.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
86% confidence
Finding

The markdown describes automatic log analysis, alert webhooks, RSS/content extraction, image search, and WordPress auto-publishing, all of which can transmit operational or content data to external services. There is no accompanying warning about reviewing destinations, verifying consent/ownership of content, or the risk of exposing system or user data.

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 · articles/openclaw-guide.md (reported line 200)May include surrounding context.

  1. 创建技能目录:
bash
mkdir -p ~/.openclaw/workspace/skills/my-skill
  1. 编写 SKILL.md:

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

md
"_comment": "Uncomment and configure for custom API",
      "type": "custom",
      "name": "My Custom Source",
      "url": "https://api.example.com/news",
      "headers": {
        "Authorization": "$MY_API_TOKEN"
      },

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 · config.example.json (reported line 46)May include surrounding context.

json
"_comment": "Uncomment and configure for custom API",
      "type": "custom",
      "name": "My Custom Source",
      "url": "https://api.example.com/news",
      "headers": {
        "Authorization": "$MY_API_TOKEN"
      },

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The manifest sets "language": "zh" as a fixed default, which is a natural-language locale constraint. There is no indication in this file that users can opt into another language or that the skill is specifically intended only for a Chinese-language or China-region use case.

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/auto_publish.py (reported line 261)May include surrounding context.

python
def search_unsplash(query: str, api_key: str) -> str:
    """Search Unsplash for an image, return download URL."""
    url = f"https://api.unsplash.com/search/photos?query={quote(query)}&per_page=1&orientation=landscape"
    headers = {
        "Authorization": f"Client-ID {api_key}",
        "Accept": "application/json",

Tainted flow: 'local_path' from os.environ.get (line 368, credential/environment) → open (file write)

Medium
Category
Data Flow
Confidence
65% confidence
Finding

Data from a source is assigned to a variable that is later passed to a sink, creating a variable-mediated taint flow.

Content

Scanner excerpt · scripts/auto_publish.py (reported line 380)May include surrounding context.

python
if len(img_data) < 1000:
            logger.warning(f"Downloaded image too small ({len(img_data)} bytes), skipping")
            return ""
        with open(local_path, "wb") as f:
            f.write(img_data)
        logger.info(f"Image downloaded: {local_path} ({len(img_data)} bytes)")
        return str(local_path)

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The pipeline assigns a default language of "en" when no language is configured, which imposes a specific locale without any visible user choice in this file. This can violate language/locale policy because the behavior prefers English by default rather than prompting for or documenting user opt-in.

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/auto_publish.py (reported line 281)May include surrounding context.

python
class PexelsFetcher:
    """Fetch images from Pexels API."""

    BASE_URL = "https://api.pexels.com/v1"

    def __init__(self, api_key: str):
        self.api_key = api_key

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/fetch_image.py (reported line 73)May include surrounding context.

python
class PexelsFetcher:
    """Fetch images from Pexels API."""

    BASE_URL = "https://api.pexels.com/v1"

    def __init__(self, api_key: str):
        self.api_key = api_key