Back to skill

Security audit

Class Seven

Security checks for vulnerabilities and agentic risk

Overview

This multi-agent workflow skill is coherent, but it needs review because it can route sensitive code or logs to external models and recommends unsafe remote installer commands and persistent agent configuration changes.

Review this skill before installing. It is not clearly malicious, but use it only with explicit approval for external model calls, sanitize logs and repository content before sharing, avoid pipe-to-execute installer commands unless you independently trust and verify them, and treat the suggested Claude/Kimi config changes as persistent changes to future agent behavior.

Vulnerability Patterns
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (2)

T03 · Remote Payload Retrieval and Execution

Error
Location
references/tools-guide.md:131
Finding
Unverified Remote PowerShell Installers Are Downloaded and Executed<![CDATA[ ## Vulnerability Details **File Location**: `references/tools-guide.md`, lines 131–134 **Vulnerability Type**: Remote payload retrieval and execution **Risk Level**: High ### Vulnerable Code ```powershell # Claude Code irm https://claude.ai/install.ps1 | iex # Kimi CLI irm https://code.kimi.com/install.ps1 | iex ``` ### Technical Analysis The documented installation procedure uses PowerShell's `Invoke-RestMethod` alias (`irm`) to retrieve mutable scripts from external URLs and pipes their contents directly into `Invoke-Expression` (`iex`). This causes remotely supplied PowerShell code to execute immediately in the current user's security context. No version pinning, cryptographic checksum validation, publisher-signature verification, local inspection, or execution sandbox is required. Consequently, the effective code executed by this Skill can change after the Skill package has been audited. Trust in the downloaded payload depends entirely on the external servers, their upstream deployment systems, DNS resolution, and the host's TLS trust chain. This behavior is not required for the Skill's core multi-agent workflow. Safer installation processes can obtain the same tools without directly executing unverified network content. ### Attack Path 1. An attacker compromises an installer endpoint, its publishing pipeline, or another component in the delivery chain. 2. The attacker replaces the expected installer with malicious PowerShell content. 3. A user follows the documented setup instructions. 4. `irm` retrieves the modified response. 5. The pipeline passes the response directly to `iex` without review or verification. 6. The malicious payload executes with all permissions available to the PowerShell process. 7. The payload can access user data, alter files, steal credentials available to the process, install persistence, or download further components. ### Impact Assessment Successful exploitation provides arbitrary code execution with the pri ...[truncated 539 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Remove all `irm ... | iex` installation instructions. 2. Direct users to a version-pinned release or installer from an authenticated vendor release page. 3. Download the installer to a local file without executing it: ```powershell Invoke-WebRequest -Uri "<version-pinned URL>" -OutFile "./installer.ps1" ``` 4. Publish and require verification of a trusted SHA-256 checksum: ```powershell Get-FileHash "./installer.ps1" -Algorithm SHA256 ``` 5. Where applicable, require validation of the vendor's Authenticode signature: ```powershell Get-AuthenticodeSignature "./installer.ps1" ``` 6. Tell users to inspect the downloaded script before execution. 7. Run installation with the least-privileged account possible and only request elevation if a documented installation step requires it. 8. Prefer signed package-manager distributions with pinned package names and versions. ]]>

T09 · Insecure Skill Coding Practices

Error
Location
references/examples.md:65
Finding
Production Logs and Proprietary Project Content May Be Forwarded to External Models Without Data Controls<![CDATA[ ## Vulnerability Details **File Location**: `references/examples.md`, lines 65–210 **Vulnerability Type**: Uncontrolled transmission of potentially sensitive information **Risk Level**: High Additional relevant locations within this range include lines 98–115 and 177–210. ### Vulnerable Code Production-log forwarding: ```python rca = sessions_spawn( task="""Analyze these production logs for 500 errors: <logs attached> Identify root cause and provide fix strategy""", model="anthropic/claude-sonnet-4-5", label="debugger-500" ) ``` Pull-request content forwarding to multiple external models: ```python # Fetch PR content first pr_content = fetch_pr(42) reviews = [ sessions_spawn( task=f"Review PR against requirements: {pr_content}", model="kimi-coding/k2p5", label="review-pm" ), sessions_spawn( task=f"Review design patterns: {pr_content}", model="anthropic/claude-sonnet-4-5", label="review-arch" ), sessions_spawn( task=f"Review tests and edge cases: {pr_content}", model="kimi-coding/k2p5", label="review-test" ) ] consolidated = consolidate_reviews(reviews) ``` Architecture and implementation content forwarded through the pipeline: ```python # Phase 2: Architect design = sessions_spawn( task=f"""As Architect, design system for: {prd.output} Include: tech stack, data models, API specs""", model="anthropic/claude-sonnet-4-5", label="arch-design" ) # Phase 3: Developer code = sessions_spawn( task=f"""As Developer, implement: {design.output} Follow coding standards, add comments""", model="kimi-coding/k2p5", label="dev-impl" ) # Phase 4: Tester qa = sessions_spawn( task=f"""As Tester, verify: Code: {code.output} Against: {prd.acceptance_criteria} Include: test cases, bug report if any""", model="kimi-coding/k2p5", label="test-qa" ) ``` ### Technical Analysis The examples ...[truncated 2980 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Require explicit, informed user approval before sending repository content, logs, or internal artifacts to any external model. 2. Add a mandatory preprocessing stage that detects and redacts: - API keys and authentication tokens. - Cookies, authorization headers, and session identifiers. - Passwords, private keys, and connection strings. - Personal data and customer-provided content. - Internal hostnames, addresses, and unrelated operational metadata. 3. Default to a local-only or approved enterprise model for production logs and private repositories. 4. Apply least-data principles to agent context. Send each role only the specific files, functions, log fields, or excerpts necessary for its task. 5. Require an explicit provider allowlist and document each provider's retention, training, access-control, residency, and deletion policies. 6. Block transmission when secret scanning detects unresolved credentials. 7. Replace raw production data in examples with sanitized synthetic samples. 8. Add repository policy checks that prevent protected paths and files, such as `.env`, private keys, credential stores, and deployment secrets, from entering prompts. 9. Record auditable user consent and destination metadata without logging the sensitive prompt contents themselves. 10. Revoke and rotate any live credential discovered in content that has already been transmitted. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Rogue AgentSelf-Modification, Session Persistence
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (8)

Ae1

High
Category
analysis-evasion
Content
- Tool integration guide: See [references/tools-guide.md](references/tools-guide.md)
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Agent Config Directory Access

High
Category
Agent Snooping
Content
Both tools should be configured for Windows/PowerShell:

```json
// ~/.claude/settings.json
{
  "systemPrompt": "Use Windows PowerShell commands. Never use: &&, grep, curl, cat, rm -rf, mkdir -p"
}
Confidence
90% confidence
Finding
Skill reads from agent configuration directories (.claude/, .codex/, .gemini/). These directories may contain API keys, personal settings, and other credentials that the skill has no legitimate need to access.

Vague Triggers

Medium
Confidence
91% confidence
Finding
The skill description is very broad and frames the skill as applicable to many complex development tasks without strong activation boundaries. In an agent ecosystem, overly broad invocation guidance can cause the skill to be selected in situations where multi-agent orchestration, tool use, or code-modifying behavior is unnecessary, increasing the chance of unsafe delegation, excessive permissions use, or unintended execution paths.

Vague Triggers

Medium
Confidence
93% confidence
Finding
The 'When to Use' section lists broad categories like debugging, code review, and end-to-end delivery, but does not define constraints, prerequisites, or non-applicable scenarios. This makes over-activation more likely, especially because the skill orchestrates multiple specialized agents and tool choices, which can amplify mistakes, expand attack surface, and bypass more narrowly scoped workflows.

Missing User Warnings

Medium
Confidence
92% confidence
Finding
The example explicitly sends production logs to an external model for analysis, but provides no warning, sanitization step, or approval gate before transmitting potentially sensitive operational data. Production logs commonly contain secrets, personal data, internal URLs, tokens, stack traces, or other confidential context, so this can cause unintended data exfiltration to a third-party service.

Missing User Warnings

Medium
Confidence
96% confidence
Finding
The guide instructs users to execute remote PowerShell install scripts via `irm ... | iex`, which downloads and immediately executes code without verification, pinning, or integrity checks. In a multi-agent development workflow, this is especially risky because users may copy these commands into privileged environments, enabling supply-chain compromise or arbitrary code execution if the endpoint or delivery path is tampered with.

Natural-Language Policy Violations

Medium
Confidence
91% confidence
Finding
The guide states tools should be configured for Windows/PowerShell and hard-codes system prompts instructing the agent to use Windows PowerShell commands and never use common Unix-style commands. This is a language/locale/platform constraint expressed as a blanket policy rather than an optional or justified environment-specific preference.

Session Persistence

Medium
Category
Rogue Agent
Content
```json
// ~/.claude/settings.json
{
  "systemPrompt": "Use Windows PowerShell commands. Never use: &&, grep, curl, cat, rm -rf, mkdir -p"
}

// ~/.kimi/config.toml
Confidence
60% confidence
Finding
Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Static analysis

No suspicious patterns detected.