Back to skill

Security audit

happy-notes

Security checks for vulnerabilities and agentic risk

Overview

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.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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
Findings (4)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/iflow_common.py:21
Finding

Bearer Credential Exfiltration Through Unvalidated API Base URL Override

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/pipeline_web_search.py:52
Finding

Server-Side Request Forgery and Unbounded Download Through Search Report URL

Content
View full analysis
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
README.md:24
Finding

Mutable Unpinned Package Is Downloaded and Executed During Installation

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Note
Location
README.md:41
Finding

API Key File Is Created Without Explicit Restrictive Permissions

Content
View full analysis
~/.config/happy-notes/api-key ``` The root skill gives equivalent guidance: ```bash # 方式 A — 配置文件(推荐,Linux/Mac) mkdir -p ~/.config/happy-notes && echo "your_api_key" > ~/.config/happy-notes/api-key ``` ### Technical Analysis The setup instructions store the API key in a plaintext file but do not explicitly set directory mode `0700` or file mode `0600`. Actual permissions depend on the user's current `umask` and existing directory permissions. On systems with a permissive `umask`, the credential file may be readable by other local users. If the directory or file already exists with weak permissions, shell redirection does not necessarily correct those permissions. ### Attack Path 1. A user follows the documented setup command under a permissive `umask`, or the target path already has weak permissions. 2. The API key file is created or retained with group-readable or world-readable permissions. 3. Another local account reads `~/.config/happy-notes/api-key`. 4. The account uses the stolen key against the iflow API. ### Impact Assessment A local user with filesystem access may obtain the iflow API credential. The resulting scope depends on the permissions associated with that key and may include access to the user's knowledge bases and generated content. This issue requires local filesystem access and insecure effective permissions; it is not remotely exploitable by itself. ]]>
Remediation
View remediation
"$HOME/.config/happy-notes/api-key" chmod 600 "$HOME/.config/happy-notes/api-key" ``` Additional hardening measures: 1. Check file ownership and permissions before reading the credential. 2. Refuse to use a credential file that is group-readable, world-readable, or owned by another user. 3. Avoid placing literal credentials in shell history. 4. Prefer an operating-system credential manager or secret store where available. 5. Document a safe credential-rotation procedure in case local disclosure is suspected. ]]>
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Rogue AgentSelf-Modification, Session Persistence
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
Findings (60)

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Vague Triggers

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
86% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
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.

Content

Scanner excerpt · README.md (reported line 35)May include surrounding context.

md
### 1. Get an API Key

Visit [iflow.cn](https://iflow.cn/?open=api-key) to create your API key.

### 2. Configure Credentials

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
91% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
82% confidence
Finding

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.

Content

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

bash
# 方式 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"

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
81% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Ae4

Medium
Category
analysis-evasion
Confidence
80% confidence
Finding

Suspicious Unicode normalization or mixed-script content

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

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.

Content

No source excerpt is available for this finding.