Back to skill

Security audit

3232

Security checks for vulnerabilities and agentic risk

Overview

This is a legitimate AI-skill manager, but it asks agents to run unpinned tooling and make broad skill changes without enough confirmation safeguards.

Install only if you trust the @tiktok-fe/skills package and are comfortable letting an agent manage skill files that affect future AI-agent behavior. Prefer pinned package versions, review update lists before applying changes, avoid blanket --force or -y on destructive commands, limit actions to project scope or specific agents, and disable telemetry if you do not want install metadata uploaded.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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 (2)

T08 · Insecure Dependencies

Error
Location
SKILL.md:10
Finding
Unpinned External CLI Installation and Execution<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:10-12` **Vulnerability Type**: Unpinned third-party dependency execution **Risk Level**: High ### Vulnerable Code ```bash npm install -g @tiktok-fe/skills # or: npx @tiktok-fe/skills [command] ``` ### Technical Analysis The skill directs AI agents to install or execute `@tiktok-fe/skills` without specifying an exact package version, lockfile, or integrity hash. Consequently, npm resolves a mutable package release at execution time. The `npx` form can download and immediately execute package code. The global installation form may also run package lifecycle scripts and makes the resolved CLI persistently available in the user's environment. The audited project contains only documentation and does not include the external CLI's source code, so its effective behavior cannot be verified from this artifact. This creates a supply-chain trust boundary: a compromised package account, malicious replacement release, registry compromise, or incompatible future version could cause agents following these instructions to execute code that was not present during the skill audit. ### Attack Path 1. An attacker compromises the npm package, a maintainer account, or the package publication process. 2. The attacker publishes a malicious release under the same unpinned package name. 3. An AI agent loads this skill and follows the documented installation command. 4. npm resolves the attacker-controlled release because no exact version or integrity value is specified. 5. Package lifecycle code or the downloaded CLI executes with the permissions of the agent user. 6. The malicious package can access files, environment variables, network resources, and writable agent configuration directories available to that user. ### Impact Assessment Successful exploitation could provide arbitrary code execution with the invoking user's privileges. The affected scope may include the current project, user-owned files, environm ...[truncated 411 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Pin the dependency to an audited exact version, for example: ```bash npm install -g @tiktok-fe/skills@X.Y.Z npx --yes @tiktok-fe/skills@X.Y.Z [command] ``` 2. Verify the package tarball against a documented cryptographic integrity hash before execution. 3. Prefer a project-local dependency governed by a committed lockfile instead of a global installation. 4. Audit the resolved package source, lifecycle scripts, transitive dependencies, and release provenance. 5. Disable lifecycle scripts where compatible: ```bash npm install --ignore-scripts ... ``` 6. Execute the CLI in a restricted environment with minimal filesystem access, sanitized environment variables, and constrained network access. 7. Establish a controlled update process that reviews new versions before changing the pinned version. ]]>

other

Note
Location
llms/commands/add.txt:90
Finding
Installation Telemetry Is Enabled by Default<![CDATA[ ## Vulnerability Details **File Location**: `llms/commands/add.txt:90-95` **Vulnerability Type**: Default-on telemetry and undisclosed outbound data transmission **Risk Level**: Low ### Vulnerable Code ```text ## Telemetry and privacy - **codebase installs**: When source is `--source codebase`, install telemetry is **never uploaded** (CLI does not request it; Web API also rejects codebase track requests). - **Other telemetry**: Controlled by env `DISABLE_TELEMETRY` and config `telemetry`. Priority: codebase (never) → `DISABLE_TELEMETRY` → `config.telemetry` → default `true`. - **DISABLE_TELEMETRY**: Values `0`/`1`/`true`/`false`/`t`/`f`/`yes`/`no`/`y`/`n`. `1`, `true`, `yes`, `y`, `t` disable telemetry. - **Config `telemetry`**: Boolean, default `true`. Use `config set telemetry false` to disable all non-codebase telemetry. ``` ### Technical Analysis For installations other than the `codebase` source, telemetry defaults to enabled. Therefore, invoking the documented installation workflow may initiate an outbound telemetry transmission without a separate opt-in step. The artifact does not identify the complete telemetry schema, destination endpoint, retention policy, or whether identifiers are included. It consequently cannot establish that secrets or private file contents are transmitted. The confirmed issue is limited to default-on transmission of installation telemetry and insufficient disclosure of its precise contents in the reviewed documentation. ### Attack Path 1. An AI agent invokes `ai-skills add` for a non-codebase source. 2. Neither `DISABLE_TELEMETRY` nor the `telemetry` configuration has been set to disable collection. 3. The CLI applies its documented default value of `true`. 4. Installation telemetry is uploaded by the external CLI. 5. The receiving service obtains the telemetry fields implemented by the CLI. ### Impact Assessment The direct impact is a potential privacy and metadata disclosure affecting non-codebase skill in ...[truncated 388 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Change telemetry to opt-in by setting its default to `false`. 2. Request explicit user consent before the first telemetry transmission. 3. Document the exact transmitted fields, destination domains, purpose, retention period, and deletion procedure. 4. Add the privacy behavior prominently to `SKILL.md` and installation examples rather than only to detailed reference material. 5. In agent-oriented workflows, disable telemetry before installation: ```bash ai-skills config set telemetry false --pure ``` or: ```bash DISABLE_TELEMETRY=1 ai-skills add skill-name --source local --project --pure ``` 6. Minimize and anonymize collected fields, avoid stable identifiers where possible, and ensure telemetry failures do not block installation. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Rogue AgentSelf-Modification, Session Persistence
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (32)

Self-Modification

High
Category
Rogue Agent
Content
```bash
ai-skills whoami --json
ai-skills init --name my-skill --template basic --pure
# (edit SKILL.md)
ai-skills publish --dir ./my-skill --pure -y
```
Confidence
85% confidence
Finding
The workflow includes creating a new skill, editing `SKILL.md`, and publishing it, which enables the agent to produce and distribute new executable instructions that affect future agent behavior. In the context of a skill-management system, self-modification and publication are especially sensitive because they can propagate unsafe logic or persistence beyond the current session.

Self-Modification

High
Category
Rogue Agent
Content
In Pure mode:
- All output goes through `console.log` (no ANSI escape codes)
- No interactive prompts — operations that need confirmation silently skip or fail
- `shouldOverwrite` always returns `false` — use `--force` to overwrite existing skills
- Error messages use `Error: <reason>` format

## Source Platforms
Confidence
85% confidence
Finding
Skill modifies its own code, configuration, or behavior at runtime. Self-modification enables an agent to escalate privileges, disable safety constraints, or install persistent backdoors.

Self-Modification

High
Category
Rogue Agent
Content
| `-s, --soft` | Use symlink mode (shared storage) |
| `--no-soft` | Force hard copy mode |
| `-a, --agents <names>` | Specify agent(s) to install to (comma-separated) |
| `-f, --force` | Overwrite existing skills without prompt |
| `--cli` | Interactive mode (default) |
| `--pure` | Plain text output mode |
Confidence
85% confidence
Finding
Skill modifies its own code, configuration, or behavior at runtime. Self-modification enables an agent to escalate privileges, disable safety constraints, or install persistent backdoors.

Self-Modification

High
Category
Rogue Agent
Content
|--------|-------------|
| `-p, --project` | Update project skills (default) |
| `-g, --global` | Update global skills |
| `-t, --target <dir>` | Update skills in custom directory |
| `--dir <dir>` | Update skills in exact directory |
| `-a, --agents <names>` | Filter by specific agent(s) |
| `--filter <name>` | Update only the named skill |
Confidence
85% confidence
Finding
Updating project skills is a form of self-modification: the tool changes the skill files that agents rely on for future behavior. This is especially sensitive because project-scoped skills may directly affect repository-local agent actions, so an unsafe update can alter behavior in a targeted workspace.

Self-Modification

High
Category
Rogue Agent
Content
| `-p, --project` | Update project skills (default) |
| `-g, --global` | Update global skills |
| `-t, --target <dir>` | Update skills in custom directory |
| `--dir <dir>` | Update skills in exact directory |
| `-a, --agents <names>` | Filter by specific agent(s) |
| `--filter <name>` | Update only the named skill |
| `-y, --yes` | Skip confirmation prompts |
Confidence
85% confidence
Finding
Updating global skills modifies shared agent behavior across multiple projects and sessions, amplifying the effect of any bad or compromised update. The documentation presents this as a routine operation without emphasizing that it changes trusted agent instructions at a broad scope.

Self-Modification

High
Category
Rogue Agent
Content
### 4. Use `--force` for Overwrites

In pure mode, `shouldOverwrite` always returns `false`. Use `--force` to overwrite existing skills:

```bash
# ✅ Correct — Force overwrite
Confidence
95% confidence
Finding
The instruction to always use `--force` for overwrites tells an agent to replace existing installed skills without confirmation. Because skills influence agent behavior, forced overwrite is a direct self-modification path that can replace a trusted skill with different content, potentially introducing malicious or incompatible behavior.

Self-Modification

High
Category
Rogue Agent
Content
ai-skills remove skill-name --global --pure --force
```

### Update Skills

```bash
# Check for updates
Confidence
85% confidence
Finding
This guidance normalizes self-modification of the agent's skill environment through update operations, including non-interactive application flows elsewhere in the file. For an agent, changing its own installed skills can alter future behavior, capabilities, or trust boundaries, creating persistence and supply-chain risk if updates are unreviewed or triggered automatically.

Vague Triggers

Medium
Confidence
94% confidence
Finding
The activation description is very broad and matches many generic requests about finding, installing, updating, publishing, or managing skills across multiple agents. That over-breadth can cause the skill to trigger in situations the user did not specifically intend, increasing the chance of unnecessary package-management actions or exposure to other risky instructions in the skill.

Rp1

Medium
Category
MCP Rug Pull
Confidence
94% confidence
Finding
The skill instructs use of `npx @tiktok-fe/skills` without pinning a specific version, so each invocation may fetch and execute whatever package version is current at runtime. In an agent context, that creates supply-chain risk and makes behavior non-reproducible; a compromised or maliciously updated package could be executed automatically.

Autonomous Decision Making

Medium
Category
Excessive Agency
Content
# WRONG — will hang on confirmation prompt
ai-skills update --project --pure

# CORRECT — auto-confirm
ai-skills update --project --pure -y

# WRONG — will hang on clean confirmation
Confidence
86% confidence
Finding
The guidance explicitly recommends auto-confirm flags such as `-y` and `--force` so the agent can bypass interactive confirmation for update, add, remove, clean, and publish flows. In a skill-management tool, removing human confirmation increases the chance that an agent performs destructive or trust-sensitive operations without adequate user approval.

Rp1

Medium
Category
MCP Rug Pull
Confidence
93% confidence
Finding
The documentation instructs users and agents to execute `npx @tiktok-fe/skills` without pinning a specific version, which causes retrieval and execution of whatever package version is current at runtime. In an agent skill-management context, this increases supply-chain risk because a compromised or maliciously updated package could be run immediately with the user's privileges.

Missing User Warnings

Medium
Confidence
92% confidence
Finding
The command explicitly supports installing skills from external Git repositories and URLs into local agent directories, which can alter the user's local environment. The documentation does not present a clear trust warning, integrity verification requirement, or review step before installing content from untrusted sources, increasing supply-chain risk for skills that may contain unsafe instructions or files.

Missing User Warnings

Medium
Confidence
93% confidence
Finding
The documentation includes a reset-all capability that can overwrite user settings without any documented confirmation prompt, warning, or recovery guidance. In an agent-driven context, this increases the chance of accidental destructive configuration changes, especially if an agent issues the command on the user's behalf.

Vague Triggers

Medium
Confidence
93% confidence
Finding
This plain-text command description defines `search` as an alias without narrowing context or providing exclusion conditions. Because `search` is a very generic term, it could collide with unrelated user intents and cause unintended invocation of this skill.

Autonomous Decision Making

Medium
Category
Excessive Agency
Content
| `-n, --name <name>` | Skill name (if omitted, prompts or uses current directory name) |
| `-d, --description <text>` | Skill description (written to SKILL.md front matter; if omitted, prompts or uses default) |
| `-t, --template <type>` | Template: `basic` or `advanced` (or a path to existing skill dir) |
| `-y, --yes` | Skip prompts, use defaults |
| `--cli` | Interactive mode (default) |
| `--pure` | Plain text output mode |
Confidence
85% confidence
Finding
Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Autonomous Decision Making

Medium
Category
Excessive Agency
Content
|--------|-------------|
| `-d, --dir <path>` | Path to skill directory (defaults to current directory) |
| `-v, --version <ver>` | Version to publish (auto-increments if omitted) |
| `-y, --yes` | Skip confirmation prompts |
| `--cli` | Interactive mode (default) |
| `--pure` | Plain text output mode |
Confidence
85% confidence
Finding
Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Autonomous Decision Making

Medium
Category
Excessive Agency
Content
|--------|-------------|
| `-d, --dir <path>` | Path to skill directory (defaults to current directory) |
| `-v, --version <ver>` | Version to publish (auto-increments if omitted) |
| `-y, --yes` | Skip confirmation prompts |
| `--cli` | Interactive mode (default) |
| `--pure` | Plain text output mode |
Confidence
85% confidence
Finding
Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Autonomous Decision Making

Medium
Category
Excessive Agency
Content
|--------|-------------|
| `-d, --dir <path>` | Path to skill directory (defaults to current directory) |
| `-v, --version <ver>` | Version to publish (auto-increments if omitted) |
| `-y, --yes` | Skip confirmation prompts |
| `--cli` | Interactive mode (default) |
| `--pure` | Plain text output mode |
Confidence
85% confidence
Finding
Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Autonomous Decision Making

Medium
Category
Excessive Agency
Content
# Unpublish a specific version
ai-skills unpublish myuser/skills/my-skill --version 1.0.0

# Unpublish entire skill (skip confirmation)
ai-skills unpublish myuser/skills/my-skill --all --force

# Pure mode
Confidence
85% confidence
Finding
Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Missing User Warnings

Medium
Confidence
87% confidence
Finding
The command explicitly supports applying updates to installed skills, including unattended use via `--yes`, but the documentation does not warn that updates can overwrite existing skill files and materially change agent behavior. In the context of agent skills, silent updates increase supply-chain and integrity risk because users may approve automation without understanding that executable prompts/configuration are being replaced.

Autonomous Decision Making

Medium
Category
Excessive Agency
Content
| `--dir <dir>` | Update skills in exact directory |
| `-a, --agents <names>` | Filter by specific agent(s) |
| `--filter <name>` | Update only the named skill |
| `-y, --yes` | Skip confirmation prompts |
| `-l, --list` | List available updates without applying |
| `--include-external` | Include externally sourced skills in update check |
| `--cli` | Interactive mode (default) |
Confidence
85% confidence
Finding
The `-y, --yes` option skips confirmation prompts for updates, which means the tool can make consequential changes to installed skill definitions without a human checkpoint. In an agent-skill ecosystem, this increases the chance of unsafe behavior changes or supply-chain compromise being adopted automatically.

Autonomous Decision Making

Medium
Category
Excessive Agency
Content
Same logic but all output via `console.log`:
- Lists each skill with current → available version
- `--list` mode: Shows updates without applying
- `--yes`: Applies without confirmation
- `--filter`: Only checks/updates the specified skill

## Examples
Confidence
87% confidence
Finding
`--yes` is documented as applying updates without confirmation, enabling autonomous modification of installed skills. Because skills influence downstream agent behavior, removing human review can allow unintended or malicious upstream changes to propagate automatically across environments.

Missing User Warnings

Medium
Confidence
91% confidence
Finding
This markdown file documents that the command outputs username, real name, and email for the authenticated user, but it does not include any warning that personally identifiable information will be displayed or emitted in JSON. Because the skill affects user privacy by revealing account identity data, the description should disclose that behavior clearly.

Natural-Language Policy Violations

Medium
Confidence
84% confidence
Finding
The file presents user-facing output and sample identity data using Chinese-specific values such as '张三' with no indication that this skill is region-specific or that language/locale may vary. This can constitute a language/locale policy issue because the documentation implicitly fixes a specific locale without user opt-in or justification.

Skill Enumeration

Medium
Category
Agent Snooping
Content
```bash
ai-skills add my-skill --source local --project --pure
# Installs to: .cursor/skills/my-skill, .claude/skills/my-skill, etc.
```

### Global-Level
Confidence
85% confidence
Finding
Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.

Static analysis

No suspicious patterns detected.