Back to skill

Security audit

postey-video

Security checks for vulnerabilities and agentic risk

Overview

The video workflow fits its purpose, but weaknesses in account selection and remote downloads could expose private media or local services.

Prefer a corrected version before processing private media or unfamiliar URLs. Until then, use a trusted working directory, explicitly supply your own authentication, and restrict downloads from reaching internal services. Verify that MCP actually created each draft before reporting success. Publishing requires your approval. The companion skill and live service behavior were outside this inspection.

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

Error
Location
scripts/postey.js
Finding

Relative scope_path bypass enables project-controlled upload identity substitution

Content
View full analysis

Impact

Private videos or images selected by the user are uploaded into attacker-controlled Postey storage. The upload request contains no account_id that could bind it to the account selected earlier in the Skill workflow.

Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (11)

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

The code substantially supports the declared video-processing and upload workflow, including local files, large uploads, transcription, and cover extraction. However, it stops short of the declared end result: no executed handler creates a draft, and caption suggestions are transcript excerpts rather than separately written platform captions. Authentication, credential storage, temporary files, and media subprocesses are supporting implementation details, not unrelated capabilities. A separate agent or MCP workflow could complete the advertised task, but that behavior is not implemented in the supplied chunk.

Content

No source excerpt is available for this finding.

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 69)May include surrounding context.

md
`scripts/postey.js` here is a **byte-identical copy** of the hub's, verified by

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 74)May include surrounding context.

md
`capability-snapshot.json` sits beside it because `postey.js` requires it at runtime for the

Code capability 'env' detected in scripts/postey.js but not covered by declared permissions.

High
Category
MCP Least Privilege
Confidence
75% confidence
Finding

The skill uses 'env' capability that is not covered by the declared 'allowed-tools' preapproval. Review the host runtime's actual enforcement policy; runtime permissions are unknown unless separately verified, and this declaration alone does not establish a permission ceiling.

Content

No source excerpt is available for this finding.

Code capability 'network' detected in scripts/postey.js but not covered by declared permissions.

High
Category
MCP Least Privilege
Confidence
75% confidence
Finding

The skill uses 'network' capability that is not covered by the declared 'allowed-tools' preapproval. Review the host runtime's actual enforcement policy; runtime permissions are unknown unless separately verified, and this declaration alone does not establish a permission ceiling.

Content

No source excerpt is available for this finding.

Cloud Metadata Access

High
Category
Server-Side Request Forgery
Confidence
97% confidence
Finding

The metadata address appears in a defensive comment, but the surrounding implementation still permits network-boundary bypasses: assertPublicHttpUrl checks only the supplied hostname text, not resolved addresses or redirect destinations. An attacker-controlled hostname resolving to a private address, or a public URL redirecting internally, can make yt-dlp access services from the user's network; the Instagram cover-extraction path also passes HTTPS URLs directly to ffmpeg without this validation.

Content

Scanner excerpt · scripts/postey.js (reported line 706)May include surrounding context.

js
// A remote video URL is fetched by yt-dlp on the user's machine and behind their
// network. Without a check, `video transcribe --input <redacted-url> and
// http://169.254.169.254/ are reachable, and --print "%(title)s" returns the
// fetched page's title into the output JSON — a read primitive, not a blind hit.
// Child processes echo the input URL into stderr, and for a presigned S3 / Drive
// / CDN link the query string IS the credential. This output is read by an agent

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/postey.js (reported line 1428)May include surrounding context.

js
const existing  = readConfigFile(localPath) || {};
    // scope_path binds this config to the directory it was written for.
    writeConfig(localPath, { ...existing, scope_path: _resolvedCwd(), oauth: oauthEntry });
    // This file now holds a refresh token, which outlives the access token.
    // cmdSetup guarded its API key this way and the OAuth path never did.
    await _setupGitignore(true, true);
    console.error(fmt.success(`Tokens saved to ${fmt.dim(localPath)}`));

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
70% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · scripts/postey.js (reported line 676)May include surrounding context.

js
const probe = spawnSync("ffprobe", ["-v", "quiet", "-print_format", "json", "-show_streams", "-show_format", argv.file], { env: mediaEnv(), encoding: "utf8" });
  if (probe.status !== 0 || !probe.stdout) {
    error("ffprobe failed — is ffmpeg installed?", { hint: "brew install ffmpeg  or  sudo apt install ffmpeg", stderr: redactUrls(probe.stderr)?.slice(0, 300) });
  }
  let data;
  try { data = JSON.parse(probe.stdout); } catch { error("Could not parse ffprobe output"); }

Video command help promises draft creation, but the handlers only upload media and return inputs for a separate MCP operation.

Medium
Category
Excessive Agency
Confidence
99% confidence
Finding

L0899 states that video post creates a multi-platform draft, and L0942/L0950 make the same claim for transcription. In contrast, L0625-L0647 and L0823-L0848 explicitly stop after uploading and return a create_post next step without creating any draft. This contradiction can cause an agent to report drafts as ready for approval when no draft has been persisted.

Content

No source excerpt is available for this finding.

Unsafe Defaults

Medium
Category
Tool Misuse
Confidence
70% confidence
Finding

Tool defaults are unsafe or overly permissive (e.g. disabled TLS verification, no authentication, world-writable permissions). Unsafe defaults widen the attack surface.

Content

Scanner excerpt · scripts/postey.js (reported line 1494)May include surrounding context.

js
// Write a fresh file at 0600 and rename over the target. writeFileSync's
  // `mode` applies only on create, so writing in place left an existing 0644
  // file world-readable for the window between the write and any chmod — with
  // the key already in it. Rename is atomic, and O_EXCL means we never follow a
  // symlink a repo or a dotfile manager left in the way.
  const tmp = `${configPath}.${process.pid}.tmp`;

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
70% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · video-workflow.md (reported line 15)May include surrounding context.

Linux

pip install yt-dlp sudo apt install ffmpeg

text

For transcription (`video transcribe`), also install Whisper: