Back to skill

Security audit

Cross-Platform Social Poster

Security checks for vulnerabilities and agentic risk

Overview

The skill is coherent for social posting, but it grants production posting and credential-handling paths without enough guardrails.

Install only if you intend to let the agent post externally using real social accounts. Use test accounts or limited webhooks first, pin and verify any CLI dependency, protect `.env` files, review every destination and message before posting, and avoid posting secrets, internal screenshots, or private media.

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

T08 · Insecure Dependencies

Warning
Location
SKILL.md:14
Finding
Unpinned Global Installation and Execution of an npm Dependency## Vulnerability Details **File Location**: `SKILL.md`, lines 14-19 **Vulnerability Type**: Supply-chain exposure through an unpinned third-party package **Risk Level**: Medium ### Vulnerable Code ```bash # Install xurl npm i -g xurl # Authenticate xurl auth ``` ### Technical Analysis The Skill instructs users to globally install the latest available version of the `xurl` npm package and then execute it in an authentication context. No package version, integrity hash, lockfile, verified publisher, or trusted registry source is specified. Consequently, the package content installed when the instructions are followed may differ from the content reviewed when the Skill was published. npm installation can also run package lifecycle scripts. A compromised package release, package ownership transfer, registry account compromise, or malicious package substitution could therefore result in arbitrary code execution with the permissions of the user running npm. The subsequent `xurl auth` operation increases the sensitivity of this dependency because the installed tool may receive or access X authentication tokens and account authorization data. ### Attack Path 1. An attacker compromises the referenced npm package, its publisher account, or its distribution channel. 2. The attacker publishes a malicious release under the package name used by the Skill. 3. A user follows the documented `npm i -g xurl` instruction without a version constraint. 4. npm downloads and installs the attacker-controlled release and may execute its lifecycle scripts. 5. The user executes `xurl auth`, exposing authentication data or account access to the compromised program. 6. The malicious package can steal credentials, modify files, or execute other commands within the installing user's security context. ### Impact Assessment Successful exploitation could provide arbitrary code execution with the privileges of the user performing the install ...[truncated 441 chars]
Remediation
## Remediation Suggestions 1. Pin the dependency to a specifically reviewed version rather than installing the latest release: ```bash npm install --global xurl@REVIEWED_VERSION ``` 2. Document the expected npm registry, package publisher, repository, and package integrity information. 3. Verify the downloaded package against an approved checksum or npm integrity value before execution. 4. Prefer a project-local dependency governed by a committed lockfile over a global installation. 5. Review package lifecycle scripts and consider installing with scripts disabled where compatible: ```bash npm install --ignore-scripts --save-exact xurl@REVIEWED_VERSION ``` 6. Perform authentication using a least-privilege account and the minimum required OAuth scopes. 7. Do not run the installation with administrator or root privileges. 8. Establish a process for reviewing dependency updates before changing the pinned version.

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:52
Finding
Unescaped User-Controlled Values Embedded in Discord JSON Payloads## Vulnerability Details **File Location**: `SKILL.md`, lines 52-54 and 132-143 **Vulnerability Type**: JSON injection and malformed request construction **Risk Level**: Medium ### Vulnerable Code ```bash curl -s -X POST "$DISCORD_WEBHOOK_URL" \ -H "Content-Type: application/json" \ -d "{\"content\": \"$MESSAGE\"}" ``` The platform-specific workflow repeats the same pattern for multiple values: ```bash DISCORD_JSON=$(cat <<EOF { "content": "", "embeds": [{ "title": "$TITLE", "description": "$BODY", "url": "$LINK", "color": 3447003 }] } EOF ) ``` ### Technical Analysis The `MESSAGE`, `TITLE`, `BODY`, and `LINK` variables are inserted directly into JSON documents without JSON encoding. Values containing double quotes, backslashes, newlines, or other control characters can terminate the intended JSON string, corrupt the request, or introduce additional JSON properties. This is a JSON injection issue rather than conventional shell command injection. Shell syntax contained in these variables is not reparsed as shell code because the variables are expanded inside quoted shell contexts. However, the resulting HTTP request body can still be structurally altered. If an attacker can influence content passed into these variables, the attacker may inject Discord-supported webhook properties such as additional embeds, webhook display metadata, or mention-control settings. Less sophisticated input can cause invalid JSON and prevent legitimate posts from being delivered. ### Attack Path 1. An attacker obtains influence over content used as `MESSAGE`, `TITLE`, `BODY`, or `LINK`, such as through an automated content feed or externally supplied announcement text. 2. The attacker supplies a value containing JSON delimiters and crafted additional properties. 3. The shell interpolates the value directly into the JSON template without escaping it. 4. The resulting request eithe ...[truncated 1009 chars]
Remediation
## Remediation Suggestions Construct all JSON payloads with a serializer rather than string interpolation. For example: ```bash DISCORD_JSON=$(jq -n \ --arg content "$MESSAGE" \ '{content: $content, allowed_mentions: {parse: []}}') curl --fail-with-body --silent --show-error \ -X POST "$DISCORD_WEBHOOK_URL" \ -H "Content-Type: application/json" \ --data-binary "$DISCORD_JSON" ``` Use the same approach for embeds: ```bash DISCORD_JSON=$(jq -n \ --arg title "$TITLE" \ --arg description "$BODY" \ --arg url "$LINK" \ '{ content: "", allowed_mentions: {parse: []}, embeds: [{ title: $title, description: $description, url: $url, color: 3447003 }] }') ``` Additional hardening should include: 1. Validate URLs against an explicit `https` scheme and any required host allowlist. 2. Enforce Discord field-length limits before sending requests. 3. Disable mentions by default with `allowed_mentions`, enabling only explicitly approved mention types. 4. Reject control characters where they are unnecessary. 5. Check HTTP response codes and fail safely when Discord rejects a payload. 6. Avoid logging webhook URLs or complete request headers because the webhook URL functions as a credential.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (8)

Credential Access

High
Category
Privilege Escalation
Content
Load with:
```bash
source .env
```

---
Confidence
97% confidence
Finding
Sourcing a .env file causes secrets such as bot tokens and webhook URLs to be loaded into the shell environment, where they may be exposed to subprocesses, debugging output, accidental echoing, or compromised local tooling. The skill provides operational instructions for credential loading without any compensating security guidance.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The skill is explicitly designed to send content to external third-party platforms, but it does not warn users that messages, media, and associated metadata will be transmitted off-system using platform credentials. In an agent setting, lack of user-facing disclosure and confirmation can cause unintended data exfiltration or posting to production social channels.

External Transmission

Medium
Category
Data Exfiltration
Content
xurl post "$MESSAGE" ${IMAGE_PATH:+--media "$IMAGE_PATH"}

# Telegram
curl -s -X POST "https://api.telegram.org/bot$TELEGRAM_BOT_TOKEN/sendMessage" \
  -d chat_id="$TELEGRAM_CHAT_ID" \
  -d text="$MESSAGE" \
  -d parse_mode="Markdown"
Confidence
93% confidence
Finding
This code sends message content and credentials to external services, including Telegram and Discord, and therefore creates a direct exfiltration path from the local environment to third parties. In a skill context, that is risky when content may contain sensitive information or when posting occurs without strong user approval.

External Transmission

Medium
Category
Data Exfiltration
Content
xurl post "$MESSAGE" ${IMAGE_PATH:+--media "$IMAGE_PATH"}

# Telegram
curl -s -X POST "https://api.telegram.org/bot$TELEGRAM_BOT_TOKEN/sendMessage" \
  -d chat_id="$TELEGRAM_CHAT_ID" \
  -d text="$MESSAGE" \
  -d parse_mode="Markdown"
Confidence
93% confidence
Finding
This code sends message content and credentials to external services, including Telegram and Discord, and therefore creates a direct exfiltration path from the local environment to third parties. In a skill context, that is risky when content may contain sensitive information or when posting occurs without strong user approval.

External Transmission

Medium
Category
Data Exfiltration
Content
```bash
# Send text message
curl -s -X POST "https://api.telegram.org/bot$TOKEN/sendMessage" \
  -d chat_id="$CHAT_ID" \
  -d text="*Bold* _Italic_ [Link](https://example.com)" \
  -d parse_mode="MarkdownV2"
Confidence
90% confidence
Finding
The example sends message text to Telegram's API, which is an intentional external transmission path. In this skill's context, that is expected functionality, but it remains dangerous if users paste sensitive data, assume local-only handling, or let an agent post automatically.

External Transmission

Medium
Category
Data Exfiltration
Content
-d parse_mode="MarkdownV2"

# Send photo
curl -s -X POST "https://api.telegram.org/bot$TOKEN/sendPhoto" \
  -F chat_id="$CHAT_ID" \
  -F photo="@./image.jpg" \
  -F caption="Photo caption"
Confidence
90% confidence
Finding
This example uploads a local image file and caption to Telegram, extending the exfiltration risk from text to local file contents. That can expose screenshots, documents, or embedded metadata if users do not realize the file is being sent externally.

External Transmission

Medium
Category
Data Exfiltration
Content
```bash
# Post to all three platforms (background for speed)
xurl post "$TWEET" --media "$IMAGE" &
curl -s -X POST "https://api.telegram.org/bot$TOKEN/sendPhoto" \
  -F chat_id="$CHAT_ID" -F photo="@$IMAGE" -F caption="$TG_MSG" &
curl -s -X POST "$DISCORD_WEBHOOK" \
  -H "Content-Type: application/json" -d "$DISCORD_JSON" &
Confidence
94% confidence
Finding
This workflow posts to multiple external platforms in parallel, increasing blast radius because one action can simultaneously disclose content and media to several third-party services. Parallel background execution also makes failures and unintended sends harder to inspect before all posts are completed.

Missing User Warnings

Medium
Confidence
98% confidence
Finding
The skill instructs users to place live API secrets and webhook URLs into a .env file and source it, but provides no guidance on protecting that file. This increases the chance of accidental secret disclosure through shell history, repository commits, permissive file permissions, or reuse in unsafe environments.

Static analysis

No suspicious patterns detected.