Back to skill

Security audit

Skill Factory

Security checks for vulnerabilities and agentic risk

Overview

This skill is a coherent skill-building workflow, but it asks users to store API keys in package Markdown and can send skill content to third-party AI services without enough privacy and secret-handling guardrails.

Install only if you are comfortable with a skill that may call third-party AI services using your configured endpoints. Do not place live API keys in tech-library.md inside the skill package; use environment variables or a secret manager instead, and avoid sending confidential code, private documents, personal data, or embedded secrets to external providers unless you have reviewed and approved the exact endpoint and retention policy.

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

Warning
Location
tech-library.md:4
Finding
Insecure Storage and Exposure of External AI API Credentials<![CDATA[ ## Vulnerability Details **File Locations**: - `tech-library.md`, lines 4, 10, 38, 56, and 73 - `call-guide.md`, lines 95 and 113 **Vulnerability Type**: Plaintext secret storage and command-line credential exposure **Risk Level**: Medium ### Evidence The configuration documentation states that the repository-local Markdown file contains API keys and is read at runtime: ```text This file contains sensitive information such as API keys. Do not commit it to a public repository. skill-factory reads this file at runtime to obtain AI service API configuration. ``` The same file provides fields intended to contain provider credentials: ```markdown | api_key | <your GPT-series API key> | | api_key | <your Gemini API key> | | api_key | <your Claude API key> | ``` The invocation guide instructs users to insert the credential directly into a command-line argument: ```bash curl -s <your API address>/v1/chat/completions \ -H "Content-Type: application/json" \ -H "Authorization: Bearer <your API key>" \ -d '{ "model": "<model name>", "messages": [ {"role": "system", "content": "<system prompt>"}, {"role": "user", "content": "<user prompt>"} ], "max_tokens": 4096, "temperature": 0.7 }' ``` The response-processing example repeats the same credential-handling pattern: ```bash RESPONSE=$(curl -s -m 30 <your API address>/v1/chat/completions \ -H "Content-Type: application/json" \ -H "Authorization: Bearer <your API key>" \ -d "${REQUEST_BODY}") ``` ### Technical Analysis The documented configuration workflow encourages users to place live API credentials in `tech-library.md`, a plaintext file inside the Skill directory. Although the file warns against public commits, the project does not prescribe an environment-variable mechanism, secret manager, ignored configuration file, restrictive permissions, or automated secret detection. A warning alone does not prevent the credential from entering source-control history ...[truncated 2257 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. **Remove live credentials from Markdown configuration** - Keep only variable names and non-sensitive examples in `tech-library.md`. - Load credentials from environment variables such as `OPENAI_API_KEY`, `GEMINI_API_KEY`, and `ANTHROPIC_API_KEY`. - Do not use real-looking example tokens. 2. **Use a secret manager for deployed environments** - Retrieve credentials from the platform's managed secret facility at runtime. - Limit secret access to the specific process or service identity that requires it. - Apply provider-side scopes, quotas, and endpoint restrictions where supported. 3. **Provide safe configuration templates** - Supply a `.env.example` containing empty variable assignments only. - Add `.env`, local secret files, and generated configuration files to `.gitignore`. - Clearly state that `.env.example` must never contain real values. 4. **Restrict local secret-file permissions** - If a local secret file is unavoidable, store it outside the Skill package. - Restrict it to the owning account, such as mode `0600` on applicable systems. - Avoid copying it into build contexts, archives, or diagnostic bundles. 5. **Reduce command-line exposure** - Read the token from a protected environment variable or secret source at runtime. - Avoid hardcoding substituted bearer tokens in shell scripts and command history. - Disable shell tracing around secret-bearing operations and redact authorization headers from logs. - Prefer an SDK or protected configuration mechanism that does not persist the token in scripts. 6. **Add preventive controls** - Enable secret scanning in pre-commit hooks and CI. - Reject commits containing recognized API-key patterns. - Document immediate revocation and rotation procedures. - Rotate any key that has already been stored in the project or exposed through logs or history. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • 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
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (5)

Missing User Warnings

High
Confidence
97% confidence
Finding
The skill explicitly directs actual third-party API calls and logging of each step's inputs, outputs, and failures, but it provides no notice, consent step, or data-handling guardrails for potentially sensitive user content. In this context, the danger is elevated because a skill-factory may process arbitrary source material from other skills, user requirements, test inputs, and benchmark artifacts, all of which may be transmitted to external providers and stored in logs.

Vague Triggers

Medium
Confidence
95% confidence
Finding
The trigger phrases are broad enough to match ordinary requests about creating or improving a skill, which can cause this meta-skill to activate unexpectedly and take over conversations outside a narrowly intended context. Because this skill can generate and iterate on other skills, accidental invocation increases the chance of unsafe delegation, unintended workflow changes, or prompting the model into higher-risk meta-behavior without explicit user intent.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The guide explicitly instructs routing prompts to external AI providers but does not warn that user data, prompts, or embedded secrets may be transmitted to third parties. In a skill-generation workflow, prompts can easily contain proprietary code, internal documents, or personal data, so omission of disclosure and handling rules creates a real privacy and data-governance risk.

External Transmission

Medium
Category
Data Exfiltration
Content
所有第三方 API 使用 OpenAI 兼容格式:

```bash
curl -s <你的API地址>/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer <你的API密钥>" \
  -d '{
Confidence
93% confidence
Finding
The file provides a concrete curl template for sending system and user prompts to arbitrary external API endpoints using bearer credentials. Although presented as a configuration example, it normalizes external transmission of potentially sensitive task content without safeguards such as consent, redaction, endpoint allowlisting, or secret-handling guidance.

Natural-Language Policy Violations

Medium
Confidence
83% confidence
Finding
The file's natural-language instructions and warnings are entirely in Chinese, which can impose a fixed language on users without opt-in. The policy specifically flags language or locale constraints when the skill does not offer a user choice or document a justified regional scope.

Static analysis

No suspicious patterns detected.