Back to skill

Security audit

Typefully Skill

Security checks for vulnerabilities and agentic risk

Overview

The skill largely does what it says, but it can change, schedule, publish, and delete social-media drafts using a Typefully API key and has a real request-construction safety issue.

Review this before installing if you will let an agent act without close supervision. Use a Typefully key only for the account or social set you intend to manage, protect the key as a secret, supervise delete and publish-now actions, and avoid passing schedule values derived from untrusted text until the JSON construction is fixed.

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:56
Finding
Unescaped Schedule Value Permits JSON Request-Body Injection<![CDATA[ ## Vulnerability Details **File Location**: `scripts/typefully.sh:56-67`, `scripts/typefully.sh:172-177`, and `scripts/typefully.sh:211-216` **Vulnerability Type**: JSON request-body injection caused by incomplete validation and unsafe string interpolation **Risk Level**: Medium ### Vulnerable Code Schedule validation only verifies the beginning of an ISO-8601-like value: ```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 value is then inserted 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 is used 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 ISO-8601 regular expression is anchored only at the beginning of the input. Consequently, any value beginning with a timestamp-shaped prefix is accepted, even when arbitrary characters, quotation marks, or additional JSON properties follow it. After validation, the schedule value is concatenated directly into a JSON string without JSON encoding. An input such as: ```text 2026-03-01T09:00:00Z","attacker_field":"value ``` causes the scheduling request body to become: ```json { "publish_at": "2026-03-01T09:00:00Z", "attacker_field": "value" } ``` This is JSON injection rather than shell command injection. The generated body remains one quoted argument to `curl`, so the issue does not ...[truncated 1839 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Require the entire schedule value to match an explicitly supported format. At minimum, anchor the regular expression at both ends: ```bash if [[ "$val" =~ ^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(Z|[+-][0-9]{2}:[0-9]{2})$ ]]; then return 0 fi ``` 2. Prefer parsing the value with a date/time library so invalid calendar dates and times are rejected rather than relying exclusively on a regular expression. 3. Never construct JSON by concatenating untrusted values. Generate request bodies with a JSON serializer, such as Python's `json` module: ```bash body=$(python3 - "$when" <<'PY' import json import sys print(json.dumps({"publish_at": sys.argv[1]})) PY ) ``` 4. Apply serializer-based construction consistently to both draft creation and draft scheduling. Values should still be semantically validated even when safely encoded. 5. Add regression tests covering: - Valid UTC and offset timestamps. - `now` and `next-free-slot`. - Trailing text after an otherwise valid timestamp. - Embedded quotation marks, backslashes, newlines, and JSON delimiters. - Invalid dates and invalid timezone offsets. - Attempts to inject additional JSON properties. ]]>
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 (14)

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
90% confidence
Finding
The skill invokes shell-based functionality (`bash scripts/typefully.sh ...`) and requires external tools like `curl` and `python3`, but it does not declare any explicit tool scope such as `permissions` or `allowed-tools`. Without a restrictive tool declaration, an agent runtime may grant broader shell access than necessary, increasing the chance of unintended command execution or abuse 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
93% confidence
Finding
The delete-draft command issues an API DELETE request that removes a draft, but the script provides no confirmation prompt, warning message, or explicit disclosure before performing the destructive action. Although usage text lists the command, it does not warn that the operation is irreversible or otherwise destructive.

Missing User Warnings

Low
Confidence
84% confidence
Finding
This markdown file documents access to a required API credential and tells users how to store it, but it does not include any caution about protecting the key, avoiding shell history leakage, or treating the credential as sensitive. Because markdown files should warn about behaviors affecting privacy or system integrity, the omission is a mild safety disclosure gap.

Static analysis

No suspicious patterns detected.