Back to skill

Security audit

Byted Mediakit Shared

Security checks for vulnerabilities and agentic risk

Overview

The skill is a coherent MediaKit CLI guide, but it uses sensitive API credentials and recommends a broad global install pattern that users should review first.

Review before installing. Prefer a pinned, reviewed mediakit-cli version, avoid elevated/global installation where possible, do not pass real API keys on the command line, and confirm how ~/.mediakit/config.json is protected before using cloud mode with 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:29
Finding

Unpinned Global npm Dependency Installation

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:79
Finding

API Key Exposure Through Command-Line Arguments and Configuration Storage

Content
View full analysis
--runtime --surface cli --yes mediakit-cli init --mode local-first --api-key --endpoint --output-path ~/mediakit-output --runtime --surface cli --credential-store config --yes ``` ### Technical Analysis The documented non-interactive initialization commands pass an API key directly through the `--api-key` command-line argument. Depending on the operating system and execution environment, command arguments can be exposed through: - Shell history - Process inspection utilities - Terminal transcripts - CI/CD logs - Agent execution traces - Monitoring and audit systems - Wrapper scripts or error reports that record complete commands The second command also explicitly selects configuration-file credential storage through `--credential-store config`. The Skill does not state whether this storage is encrypted or whether restrictive file permissions are enforced. If the resulting configuration file is plaintext or broadly readable, the credential could remain exposed after initialization. The audit did not confirm the CLI's internal credential-storage implementation, so plaintext storage is a conditional risk rather than an established implementation fact. Command-line disclosure, however, is directly present in the documented usage pattern. ### Attack Path 1. A user or automated agent substitutes a real MediaKit API key for ``. 2. The initialization command is executed as documented. 3. The complete command is retained in shell history, automation logs, an agent transcript, or a process-monitoring system. 4. A local user, logging-system operator, compromised process, or other party with access to those records retrieves the key. 5. The attacker uses the exposed credential against the confi ...[truncated 786 chars]
Remediation
View remediation
--surface cli --yes unset MEDIAKIT_API_KEY ``` 4. Prefer an OS keychain or dedicated secret manager over configuration-file storage. 5. If configuration storage is unavoidable: - Require restrictive ownership and permissions, such as mode `0600`. - Prevent the file from being included in backups, support bundles, or source control without suitable protection. - Encrypt the credential at rest where practical. 6. Redact secrets from terminal output, logs, errors, telemetry, and agent transcripts. 7. Rotate any key that may already have appeared in shell history or automation logs. 8. Use narrowly scoped, short-lived credentials and monitor them for anomalous usage. ]]>
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (3)

Whitespace Padding

Medium
Category
Prompt Injection
Confidence
70% confidence
Finding

Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.

Content

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

md
- Environment variables / config file: `MEDIAKIT_API_KEY`, `MEDIAKIT_ENDPOINT`, `MEDIAKIT_SURFACE`, `MEDIAKIT_RUNTIME`

| Variable            | Required             | Description                                                                                                                                              |
| ------------------- | -------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `MEDIAKIT_API_KEY`  | Required (cloud mode) | API authentication token                                                                                                                                 |
| `MEDIAKIT_ENDPOINT` | Optional             | API endpoint                                                                                                                                             |

Whitespace Padding

Medium
Category
Prompt Injection
Confidence
70% confidence
Finding

Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.

Content

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

md
| Variable            | Required             | Description                                                                                                                                              |
| ------------------- | -------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `MEDIAKIT_API_KEY`  | Required (cloud mode) | API authentication token                                                                                                                                 |
| `MEDIAKIT_ENDPOINT` | Optional             | API endpoint                                                                                                                                             |
| `MEDIAKIT_SURFACE`  | Optional             | Request-source Header `x-surface`. Defaults to `cli`. Skill should set `skill`, Plugin should set `plugin`; CLI reports them as `cli/skill` or `cli/plugin`. |
| `MEDIAKIT_RUNTIME`  | Optional             | Request-source Header `x-runtime`. Set to host name such as `claude` / `arkclaw`; falls back to environment probing or `unknown` when not configured.    |

Whitespace Padding

Medium
Category
Prompt Injection
Confidence
70% confidence
Finding

Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.

Content

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

md
| Variable            | Required             | Description                                                                                                                                              |
| ------------------- | -------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `MEDIAKIT_API_KEY`  | Required (cloud mode) | API authentication token                                                                                                                                 |
| `MEDIAKIT_ENDPOINT` | Optional             | API endpoint                                                                                                                                             |
| `MEDIAKIT_SURFACE`  | Optional             | Request-source Header `x-surface`. Defaults to `cli`. Skill should set `skill`, Plugin should set `plugin`; CLI reports them as `cli/skill` or `cli/plugin`. |
| `MEDIAKIT_RUNTIME`  | Optional             | Request-source Header `x-runtime`. Set to host name such as `claude` / `arkclaw`; falls back to environment probing or `unknown` when not configured.    |