Back to skill

Security audit

Typefully Skill

Security checks for vulnerabilities and agentic risk

Overview

The skill mostly does what it says, but it can change or publish social content and has a scheduling input flaw that merits review before use.

Install only if you are comfortable giving this skill access to manage your Typefully drafts and potentially publish or delete social content. Avoid passing schedule values copied from untrusted text, be careful with 'now' and delete-draft, and prefer a fixed version that fully validates and JSON-encodes schedule values and asks for confirmation before destructive actions.

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

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/typefully.sh:52
Finding
Schedule Parameter Allows Authenticated JSON Body Injection<![CDATA[ ## Vulnerability Details **File Location**: `scripts/typefully.sh:52-62`, `scripts/typefully.sh:178-182`, and `scripts/typefully.sh:215-221` **Vulnerability Type**: Improper input validation and unsafe JSON construction **Risk Level**: Medium ### Complete Vulnerable Code The schedule validator accepts any value beginning with a timestamp-like prefix because the regular expression is not anchored at the end: ```bash validate_schedule() { local val="$1" case "$val" in next-free-slot|now) return 0 ;; esac # ISO 8601 pattern if [[ "$val" =~ ^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2} ]]; then return 0 fi die "Invalid schedule value: $val (expected ISO 8601, 'next-free-slot', or 'now')" } ``` The accepted input is interpolated directly into JSON when creating a draft: ```bash local body="{\"platforms\":{${platform_json}}" if [[ -n "$schedule" ]]; then validate_schedule "$schedule" body+=",\"publish_at\":\"${schedule}\"" fi body+="}" ``` The same unsafe interpolation occurs when scheduling an existing draft: ```bash cmd_schedule_draft() { local draft_id="$1" when="$2" validate_draft_id "$draft_id" validate_schedule "$when" api PUT "/social-sets/${SOCIAL_SET_ID}/drafts/${draft_id}" \ -d "{\"publish_at\":\"${when}\"}" } ``` ### Technical Analysis The timestamp regular expression validates only the beginning of the supplied value. It does not require the entire input to conform to an ISO 8601 timestamp. Consequently, a value may begin with a timestamp-like string and contain arbitrary trailing characters, including quotation marks and additional JSON properties. After validation, the value is embedded into a JSON document through shell string concatenation. No JSON serializer is used at these sinks, so embedded quotation marks, commas, braces, and property names retain their JSON syntax. For example, an input shaped like the following passes the prefix validation: ```text 2026-03-01T09:0 ...[truncated 2007 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Replace prefix-only validation with full-string validation. Require a timezone and reject all trailing data. For example: ```bash if [[ "$val" =~ ^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(\.[0-9]+)?(Z|[+-][0-9]{2}:[0-9]{2})$ ]]; then return 0 fi ``` 2. Parse the value with a date-time parser rather than relying exclusively on a regular expression. This will reject impossible dates and times in addition to malformed syntax. 3. Construct all request bodies using a JSON serializer. For example, Python can safely encode the value: ```bash body=$(python3 - "$when" <<'PY' import json import sys print(json.dumps({"publish_at": sys.argv[1]})) PY ) api PUT "/social-sets/${SOCIAL_SET_ID}/drafts/${draft_id}" -d "$body" ``` 4. Apply the same serializer-based approach to `cmd_create_draft` so that every user-controlled value is encoded as data rather than concatenated as JSON syntax. 5. Add regression tests containing quotation marks, braces, commas, control characters, malformed timestamps, missing timezones, and valid timestamps with malicious suffixes. Tests should verify that malformed values are rejected and that valid values produce exactly one `publish_at` property. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (15)

Ae1

High
Category
analysis-evasion
Content
bash scripts/typefully.sh <command> [options]
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
bash scripts/typefully.sh <command> [options]
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
bash scripts/typefully.sh <command> [options]
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
bash scripts/typefully.sh <command> [options]
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
bash scripts/typefully.sh <command> [options]
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
bash scripts/typefully.sh <command> [options]
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
bash scripts/typefully.sh <command> [options]
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
bash scripts/typefully.sh <command> [options]
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

External Script Fetching

High
Category
Supply Chain
Content
http_code=$(curl -s -w '%{http_code}' -o "$tmpfile" -X "$method" "${API_BASE}${endpoint}" \
    -H "Authorization: Bearer ${API_KEY}" \
    -H "Content-Type: application/json" \
    "$@") || { rm -f "$tmpfile"; die "curl failed (network error)"; }

  body=$(cat "$tmpfile")
  rm -f "$tmpfile"
Confidence
90% confidence
Finding
Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Tool Parameter Abuse

High
Category
Tool Misuse
Content
cmd_delete_draft() {
  local draft_id="$1"
  validate_draft_id "$draft_id"
  api DELETE "/social-sets/${SOCIAL_SET_ID}/drafts/${draft_id}"
}

usage() {
Confidence
90% confidence
Finding
Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Lp3

Medium
Category
MCP Least Privilege
Confidence
94% confidence
Finding
The skill invokes shell-based tooling (`bash`, `curl`, `python3`) and requires sensitive credentials, but it does not declare any explicit tool restrictions such as `permissions` or `allowed-tools`. Without a scoped tool policy, an agent runtime may grant broader shell access than necessary, increasing the chance of command execution abuse, unintended side effects, or secret exposure if the skill is misused or later modified.

External Transmission

Medium
Category
Data Exfiltration
Content
#!/usr/bin/env bash
set -euo pipefail

API_BASE="https://api.typefully.com/v2"
SOCIAL_SET_ID=""
API_KEY=""
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Missing User Warnings

Medium
Confidence
90% confidence
Finding
The delete-draft command issues an API DELETE request that removes a draft, but the script provides no confirmation prompt, print/log message, or inline warning near the destructive action. Although the usage text names the command, there is no explicit user disclosure that the operation is destructive or irreversible at execution time.

Missing User Warnings

Low
Confidence
80% confidence
Finding
The create-draft command sends user-provided text to the external Typefully API via an HTTP POST, but the function does not display a notice, prompt, or comment warning that draft content will be transmitted off-system. The same script documents command usage, but it does not explicitly disclose this data-sharing behavior near execution.

Missing User Warnings

Low
Confidence
80% confidence
Finding
The edit-draft command uploads user-supplied draft content to the external Typefully API with a PUT request, but there is no prompt, visible notice, or inline warning about transmitting that content. This is a data-affecting network operation that lacks explicit disclosure in the script itself.

Static analysis

No suspicious patterns detected.