Back to skill

Security audit

Agent CLI Builder

Security checks for vulnerabilities and agentic risk

Overview

This skill is a coherent CLI-building guide that discusses installs, credentials, and writes openly with safety boundaries rather than hiding execution.

Before using it, be comfortable with an agent modifying CLI projects, running package-manager/test commands, and generating auth or installer flows. Review any generated global install or npx-based install command, and do not paste production credentials into chat.

Vulnerability Patterns
  • 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
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
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 (11)

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
| HMAC, mTLS, or composite auth | Custom auth/plugin | `custom-auth-plugin.md` |

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
| HMAC, mTLS, or composite auth | Custom auth/plugin | `custom-auth-plugin.md` |

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 · references/auth-patterns.md (reported line 79)May include surrounding context.

md
- `scope` ← `scope`
- `token_endpoint_auth_method` ← `client_secret_basic`

So the common case writes `scope` exactly once; pass explicit `clientMetadata.scope` only when registration declares a different set than authorization. Access tokens are always Bearer (RFC 6750); `x-api-key`/`basic` styles belong to custom plugins via `injectAuthHeader`.

The factory takes no directory or store parameter — the local state arrives via `apply(services)` from `defineCliApp({ dir })`. Use `createMemoryLocalState` with `defineCliApp({ localState })` in tests.

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
80% 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.

Content

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

md
### 4. Enforce trust boundaries

- Never place passwords, private keys, or long-lived tokens in source, examples, logs, snapshots, or command arguments. Do not ask users to provide production credentials; registration must be completed in their own terminal, with the current unmasked-input limitation disclosed.
- Never log complete headers, authentication responses, or response bodies that may contain sensitive data. Redact diagnostic output.
- Disclose installation, global writes, login, network calls, and data mutations before acting; obtain approval when required.
- For writes, declare preview, confirmation, and idempotency through `policy`; do not hide execution-safety flags inside the business Zod object.

Rp1

Medium
Category
MCP Rug Pull
Confidence
91% confidence
Finding

The documentation recommends npx skills add without pinning a package version, which can cause execution of an unexpected or newly published package version at install time. In an agent-driven or automated environment, this increases supply-chain risk because the invoked code is fetched and executed dynamically.

Content

No source excerpt is available for this finding.

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 · references/core-api.md (reported line 137)May include surrounding context.

md
Key `defineCliApp` options:

| Option          | Rule                                                                                    |
| --------------- | --------------------------------------------------------------------------------------- |
| `dir`           | The app's one local-state root (`dir` XOR `localState`; injected via `apply(services)`) |
| `name`          | Output `source`, pipe type, and Skill identity                                          |

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The file instructs authors to put 'natural-language triggers' and only the 'nearest exclusion' into the description, which can encourage ambiguous activation criteria for generated skills. Because it explicitly says not to repeat a complete trigger table elsewhere, authors may omit the specificity and negative examples needed to prevent accidental invocation.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
91% confidence
Finding

The guidance recommends running npx skills add <url> without pinning a package/version, which can execute whatever package currently resolves from the registry at install time. In an installation workflow that may create global packages, Skill files, configuration, and credentials, this introduces a supply-chain execution risk and makes compromise of the package name, publisher, or dependency chain materially dangerous.

Content

No source excerpt is available for this finding.

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 · references/skill-optimization.md (reported line 22)May include surrounding context.

md
A production Skill must pass all five TRACE dimensions:

| Dimension     | Question                             | Standard                                                                                      |
| ------------- | ------------------------------------ | --------------------------------------------------------------------------------------------- |
| Trust         | Can it be used safely?               | No hidden side effects, sensitive-data leaks, unsupported claims, or undisclosed dependencies |
| Reliability   | Does it work consistently?           | Commands, fields, edge cases, and recovery match the implementation                           |

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
85% confidence
Finding

The natural-language instruction includes a concrete locale flag example, --lang zh, as part of the default skill-generation workflow. Because the file does not state that language selection should be based on user preference or opt-in, this can be read as endorsing a forced locale choice, which risks violating language/locale policy expectations.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

Line L038 contains a code comment written in Chinese in an otherwise English document and code sample. This imposes a language-specific instruction without offering user choice or documenting a locale-specific reason, which matches the language/locale policy violation category.

Content

No source excerpt is available for this finding.