T09 · Insecure Skill Coding Practices
- Location
scripts/create_doc.py:151- Finding
Unvalidated server-provided URL is downloaded to the local filesystem
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This skill is a legitimate remote document generator, but its broad auto-use instructions, file upload behavior, local downloads, and API-key setup guidance need careful review before installation.
Install only if you are comfortable sending full prompts and selected reference files to Skywork for remote processing. Avoid confidential documents unless your organization approves Skywork, use a protected secret store or carefully permissioned config for SKYWORK_API_KEY, do not print the key in terminal output, and inspect downloaded files before opening or processing them further.
scripts/create_doc.py:151Unvalidated server-provided URL is downloaded to the local filesystem
references/apikey-fetch.md:27API key setup instructions encourage plaintext persistence and secret disclosure
The manifest markets the skill as a general document generator, but the described behavior materially includes remote upload/parsing of user files and server-side processing that are not foregrounded as the primary operational risk. This mismatch can mislead an orchestrator or user into invoking the skill in situations where sensitive files are exposed to a third party without sufficiently informed consent.
The trigger conditions are extremely broad, instructing use for essentially any task that produces a document or any response longer than a short answer. This can cause unintended invocation, leading to unnecessary transmission of user prompts or files to a remote service and expanding the chance of privacy breaches or inappropriate autonomous actions.
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.
Option B — Claude Code settings
Add the variable to ~/.claude/settings.json:
{
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.
Option B — Claude Code settings
Add the variable to ~/.claude/settings.json:
{
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.
Option B — Claude Code settings
Add the variable to ~/.claude/settings.json:
{
The skill declares access to environment variables, network communication, and local file writing behavior but does not define an explicit tool scope such as permissions or allowed-tools. That makes the skill's effective authority ambiguous and increases the risk of overbroad execution, especially because it uploads user files and writes downloaded outputs locally.
The instructions specify a default language of English when the user does not explicitly state a preference. This imposes a language choice rather than asking the user or clearly limiting the skill to an English-specific context.
The parameter documentation states that --language defaults to English, reinforcing a fixed language default. Since the skill is multilingual elsewhere, this default can conflict with user expectations and organizational language-choice policy.
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.
## Important Notes
1. **Intent Recognition First** - Always analyze the user's request before calling scripts.
2. **Web Search Built-In** - The Doc API automatically performs web searches on demand to gather relevant content for document creation. Whether you pre-search for materials externally or not is entirely optional—either approach works fine.
3. **File ID is the Bridge** - `parse_file.py` outputs `file_id` → pass to `create_doc.py` via `--files`.
4. **Server Fetches Content** - No need to paste `parsed_content` manually; the server retrieves it using `file_id`.
5. **Content is Rewrite Query** - Synthesize the user's requirements into a clear, detailed prompt. Even when the user's instructions are long or complex, capture every requirement—don't omit anything.
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.
- Log in with your Skywork account
- Open account / Settings / API Key (**https://skywork.ai/?openApiKeySetting=1**)
- Create or copy your **API key**
If your organization uses a separate console or test environment, use the URL and credentials your team provides.
The guide explicitly tells users to run echo "$SKYWORK_API_KEY", which prints a live secret to the terminal. This can expose the key to shoulder-surfing, terminal logging, screen recording, clipboard capture, or shell/session logs, and the document does not warn users about those risks or offer a safer verification method.
The script advertises server-side OCR/text extraction of uploaded files, which expands the skill from document generation into remote document ingestion and analysis. That mismatch is dangerous because it enables collection and processing of potentially sensitive file contents under a skill description that does not prominently justify or scope such behavior.
This code uploads arbitrary local files to a remote /api/sse/file/parse endpoint, which is a data-exfiltration capability not clearly aligned with the skill's stated purpose of generating document outputs. In an agent setting, users may invoke this skill expecting document creation, while the script can transmit sensitive file contents to a server for parsing, increasing privacy and trust risks.
No suspicious patterns detected.