T09 · Insecure Skill Coding Practices
- Location
scripts/iflow_common.py:21- Finding
Bearer Credential Exfiltration Through Unvalidated API Base URL Override
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This is a real iflow knowledge-base helper, but it needs Review because its broad triggers, full-knowledge-base defaults, and network credential handling could expose or change user data unexpectedly.
Install only if you are comfortable sending selected documents, pasted notes, URLs, searches, and generated outputs to iflow. Verify the target knowledge base before delete/share actions, avoid using IFLOW_BASE_URL unless you fully trust the endpoint, and prefer an environment variable or a chmod 600 config file for the API key.
scripts/iflow_common.py:21Bearer Credential Exfiltration Through Unvalidated API Base URL Override
scripts/pipeline_web_search.py:52Server-Side Request Forgery and Unbounded Download Through Search Report URL
README.md:24Mutable Unpinned Package Is Downloaded and Executed During Installation
README.md:41API Key File Is Created Without Explicit Restrictive Permissions
The documented behavior includes destructive file-management actions such as delete, batch-delete, rename, and retry/reprocessing, but these are not clearly surfaced in the high-level skill description. This mismatch can mislead users and upstream agents about the risk profile of the skill, making accidental destructive invocation more likely.
The documented behavior includes destructive file-management actions such as delete, batch-delete, rename, and retry/reprocessing, but these are not clearly surfaced in the high-level skill description. This mismatch can mislead users and upstream agents about the risk profile of the skill, making accidental destructive invocation more likely.
The trigger rules are extremely broad and include commonplace phrases like note-taking, saving information, or even casual expense logging, causing the skill to activate in many situations unrelated to explicit knowledge-base intent. Because the skill has network, file, and shell-adjacent operational scope, over-triggering can route benign conversations into sensitive side-effecting workflows and lead to unintended data storage, sharing, or deletion.
The skill specifies that if files is omitted, the system will use all files in the knowledge base, but it does not require the agent to warn the user that the full corpus will be included in generation. This can cause unintended disclosure of unrelated or sensitive materials in generated outputs, especially when users ask for a generic report without realizing the scope.
The workflow explicitly instructs the agent not to ask the user when no files are specified and to proceed with all files, which removes an important consent checkpoint. In a knowledge-base context, this is especially risky because KBs often contain mixed-sensitivity documents, and a broad generation request could silently sweep in confidential content.
The markdown advertises create, update, delete, batch-delete, rename, and share capabilities for notebooks and files, but provides no warning that these actions can modify or permanently remove user data. Under the markdown-specific SQP-2 criteria, skills that can affect user data or system integrity should disclose such behavior so users understand the risk before invoking the skill.
The skill is explicitly designed to upload files, import URLs, perform web search, and generate external content through the iflow service, which implies user content and queries may be transmitted to remote systems. Omitting a privacy and data-handling warning in this context is security-relevant because users may unknowingly send sensitive local documents, notes, or research material to third-party services.
npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.
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.
### 1. Get an API Key
Visit [iflow.cn](https://iflow.cn/?open=api-key) to create your API key.
### 2. Configure Credentials
The skill exposes broad capabilities including environment access, file read/write, network, and shell execution, but it does not declare any explicit tool scope or allowed-tools boundary. In an agent setting, this increases the blast radius of prompt-routing mistakes or malicious user inputs because the skill can perform sensitive operations without manifest-level restriction.
The manifest uses ambiguous activation boundaries, making it difficult for the agent to distinguish between quick informational queries and requests that should invoke an external, side-effecting skill. Ambiguous routing is especially risky here because the skill can persist data, call external services, and manage knowledge-base contents.
The setup instructions recommend persisting the API key in a plaintext file under the user's home directory. Plaintext credential persistence increases the risk of local credential disclosure through other tools, backups, logs, or unintended file access by the agent or co-resident processes.
# 方式 A — 配置文件(推荐,Linux/Mac)
mkdir -p ~/.config/happy-notes && echo "your_api_key" > ~/.config/happy-notes/api-key
# 方式 B — 环境变量
export IFLOW_API_KEY="your_api_key"
The file description is written entirely in Chinese, and the expected behaviors throughout the eval set assume Chinese-language responses and prompts, while later tests explicitly require handling English inputs. This creates a language-policy inconsistency because the skill's natural-language specification does not offer a language choice or state that Chinese is optional.
The trigger/eval definitions overlap with common speech patterns like '帮我记一下', '帮我总结', or similar everyday requests, which makes accidental invocation likely. In a skill that can upload files, import URLs, store text, and generate/share outputs, over-triggering creates a real risk of unwanted persistence, external fetches, or content dissemination from casual user utterances.
The evals encode trigger behavior that is broad enough to match ordinary user requests such as note-taking, summaries, sharing, or content creation without a clear knowledge-base intent. This can cause the skill to activate unexpectedly, redirecting benign conversations into file/storage/generation workflows the user did not explicitly request, which increases the chance of unintended data handling and unsafe side effects.
The file presents all user inputs, system behavior, and user-facing responses exclusively in Chinese. Under the policy, forcing a specific language without user opt-in or a documented justification is a natural-language policy violation.
The entire skill example, including headings, user prompts, and displayed responses, is written only in Chinese, which implies a fixed language behavior. There is no indication that the user can choose another language or that the skill is intentionally limited to a Chinese-only regional context.
Suspicious Unicode normalization or mixed-script content
The file presents all user-facing examples and instructions exclusively in Chinese, which effectively forces a specific language/locale. Under the policy, language constraints should either be optional for the user or clearly documented as justified for a region-specific skill.
The example instructs the agent to generate and present a share link without warning that anyone possessing the link may access the knowledge base contents. This can lead to unintended disclosure of potentially sensitive files and generated content, especially if users assume sharing is limited to explicitly named colleagues rather than bearer-token access.
The skill instructs the agent to create and delete a local temporary markdown file containing user-supplied meeting notes, but it does not require any user-facing disclosure or guardrails around this host-side file handling. This is dangerous because pasted content may contain sensitive business data, and writing it to local disk increases exposure through local persistence, temp-directory access, logging, backup, or cleanup failures.
The skill directs the agent to upload pasted meeting content to a backend knowledge API without warning the user that the text will be transmitted to and stored by a remote service. This creates a privacy and confidentiality risk because users may paste internal notes, personal data, or proprietary information assuming the assistant is only handling it within the chat context.
The example workflow automatically imports externally gathered research artifacts and generated reports into a knowledge base without an explicit confirmation or warning about persistence, provenance, or sensitivity. This can cause users to unintentionally store third-party content, copyrighted material, or sensitive query-derived data, especially because deep research aggregates many URLs/files and normalizes the behavior as automatic.
The workflow explicitly defaults to importing externally sourced web content into a knowledge base and triggering report generation unless the user only wants to browse results. That creates an integrity and privacy risk because untrusted external content is persisted and processed without a clear, explicit confirmation step, which can lead to accidental data writes, contamination of the knowledge base, or downstream generation based on low-trust sources.
The skill’s natural-language description, user utterance examples, status messages, and user-facing prompts are all written in Chinese, and one instruction explicitly tells the agent what Chinese reminder to show the user. There is no indication that the user may choose another language or that the Chinese-only behavior is limited to a justified region-specific context.