T09 · Insecure Skill Coding Practices
- Location
SKILL.md:44- Finding
Workspace Environment File Is Executed as Shell Code
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This WordPress publishing skill does what it claims, but it gives an agent live publishing power with weak safety boundaries around credentials, confirmation, and endpoint validation.
Review carefully before installing. Only use this with a dedicated low-privilege WordPress application password, require HTTPS and a known host, prefer draft-first publishing with explicit confirmation, and avoid sourcing a shared .env file as shell code.
SKILL.md:44Workspace Environment File Is Executed as Shell Code
SKILL.md:46WordPress Credentials Can Be Transmitted Over Plaintext HTTP
SKILL.md:156User-Controlled Values Are Interpolated Directly into JSON Requests
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
Read credentials from workspace .env:
# Load credentials from .env file
source /root/.openclaw/workspace/.env
WP_URL="${WP_BLOG_URL:-https://blog.example.com}"
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
Read credentials from workspace .env:
# Load credentials from .env file
source /root/.openclaw/workspace/.env
WP_URL="${WP_BLOG_URL:-https://blog.example.com}"
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
Read credentials from workspace .env:
# Load credentials from .env file
source /root/.openclaw/workspace/.env
WP_URL="${WP_BLOG_URL:-https://blog.example.com}"
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
Read credentials from workspace .env:
# Load credentials from .env file
source /root/.openclaw/workspace/.env
WP_URL="${WP_BLOG_URL:-https://blog.example.com}"
The description does not clearly warn that the skill performs authenticated writes to a live external service, including publishing posts and modifying taxonomy. Users may believe they are only formatting content or drafting, when the skill can make irreversible or publicly visible changes.
The trigger guidance is broad enough to activate on generic discussion about blogging or article creation, which can route ordinary user conversation into a skill that performs authenticated, state-changing publication actions. In this context, over-triggering is dangerous because the skill can create categories, tags, and publish posts to a live WordPress site with little friction.
The description explicitly states 'SEO-friendly English slug generation,' which imposes a language choice by default. The file does not offer the user a language/locale choice or explain a justified region-specific requirement, so this is a natural-language locale policy issue.
This code transmits authenticated data to an external WordPress endpoint to create categories. In a skill that may auto-trigger and lacks strong confirmation boundaries, external transmission is security-relevant because it causes real state changes on a third-party system using workspace credentials.
# Create if not exists
if [ -z "$CAT_ID" ]; then
CAT_RESULT=$(curl -s -X POST "${WP_URL}/wp-json/wp/v2/categories" \
-u "${WP_USER}:${WP_PASS}" \
-H "Content-Type: application/json" \
-d "{\"name\": \"${CATEGORY_NAME}\"}")
This request creates tags on the remote WordPress site, which is an authenticated mutation of external state. Because tags are derived from content and may be auto-generated, the skill can silently modify site taxonomy in ways the user did not explicitly approve.
# Create if not exists
if [ -z "$TID" ]; then
TAG_RESULT=$(curl -s -X POST "${WP_URL}/wp-json/wp/v2/tags" \
-u "${WP_USER}:${WP_PASS}" \
-H "Content-Type: application/json" \
-d "{\"name\": \"${TAG}\"}")
This is the primary external transmission that publishes content to a live WordPress site using stored credentials. In context, the danger is elevated because the skill can push arbitrary user-provided or model-generated content directly to production, potentially causing defacement, misinformation, or accidental public disclosure.
EXCERPT="We compare two flagship processors across gaming, productivity, and power efficiency."
# Create post
POST_RESULT=$(curl -s -X POST "${WP_URL}/wp-json/wp/v2/posts" \
-u "${WP_USER}:${WP_PASS}" \
-H "Content-Type: application/json" \
-d "{
Updating an existing post via authenticated API call can alter live or draft content and metadata on a production blog. Without strict user confirmation and target validation, this can unintentionally overwrite or tamper with legitimate content.
POST_ID="123" # Existing post ID
UPDATE_RESULT=$(curl -s -X POST "${WP_URL}/wp-json/wp/v2/posts/${POST_ID}" \
-u "${WP_USER}:${WP_PASS}" \
-H "Content-Type: application/json" \
-d "{
The workflow example includes an external authenticated category-creation request, demonstrating a repeatable path for live site modification. Even as sample code, it operationalizes state-changing behavior that a user may execute without understanding the consequences.
CONTENT="<p>The battle for desktop CPU supremacy continues...</p><h2>Test Methodology</h2><p>All tests were conducted on identical platforms...</p>"
# Step 1: Create/Get Category
CAT_RESULT=$(curl -s -X POST "${WP_URL}/wp-json/wp/v2/categories" \
-u "${WP_USER}:${WP_PASS}" \
-H "Content-Type: application/json" \
-d "{\"name\": \"${CATEGORY}\"}")
This example sends authenticated tag-creation requests to the blog, modifying external taxonomy. The security concern is the same as above: easy-to-run sample code increases the chance of unintended writes to a live site.
# Step 2: Create/Get Tags
TAG_IDS=""
for TAG in "${TAGS[@]}"; do
TAG_RESULT=$(curl -s -X POST "${WP_URL}/wp-json/wp/v2/tags" \
-u "${WP_USER}:${WP_PASS}" \
-H "Content-Type: application/json" \
-d "{\"name\": \"${TAG}\"}")
This example performs authenticated post creation with publish status, causing immediate public content publication on an external service. In a skill context, publishing is the core function, but it is still dangerous when not guarded by explicit consent, draft-first behavior, and robust validation.
TAG_IDS=$(echo "$TAG_IDS" | sed 's/^,//')
# Step 3: Create Post
POST_RESULT=$(curl -s -X POST "${WP_URL}/wp-json/wp/v2/posts" \
-u "${WP_USER}:${WP_PASS}" \
-H "Content-Type: application/json" \
-d "{
The safety rules say to 'Always generate English slug for SEO-friendly URLs,' which is a blanket language requirement. No opt-in, fallback, or locale-specific justification is provided, so the instruction violates the policy against forcing a language choice.
Detected: suspicious.generated_source_template_injection