T09 · Insecure Skill Coding Practices
- Location
src/utils/safe-fs.js:21- Finding
Filesystem Path Guard Is Fail-Open by Default
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
HeartFlow appears to be a real local rule/MCP tool, but it has broader local authority and persistence than its simple safety-check framing suggests.
Review this before installing on a real workstation. Run it only as an unprivileged user, set HEARTFLOW_MCP_TOKEN yourself, set HEARTFLOW_PATH_GUARD=enforce, and avoid running the MCP server on shared or privileged systems until the token persistence and port-kill behavior are removed or made explicit opt-in.
src/utils/safe-fs.js:21Filesystem Path Guard Is Fail-Open by Default
src/mcp-server.js:189MCP Authentication Token Is Automatically Stored in a Plaintext Environment File
src/mcp-server.js:4841MCP Server Automatically Terminates Any Process Occupying Its Configured Port
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
- 存储: AES-256-GCM 持久化密钥 (自动生成, 0o600)
- 沙箱: vm 隔离 (默认关闭) | SSRF: url-validator + DNS pinning
- 出网: 统一 safeFetch | 密钥: 集中 config 解析 (env only, 无文件 fallback)
- gitignore: .env / .key / .pem 均已保护
## 认知架构
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
- 存储: AES-256-GCM 持久化密钥 (自动生成, 0o600)
- 沙箱: vm 隔离 (默认关闭) | SSRF: url-validator + DNS pinning
- 出网: 统一 safeFetch | 密钥: 集中 config 解析 (env only, 无文件 fallback)
- gitignore: .env / .key / .pem 均已保护
## 认知架构
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
- 存储: AES-256-GCM 持久化密钥 (自动生成, 0o600)
- 沙箱: vm 隔离 (默认关闭) | SSRF: url-validator + DNS pinning
- 出网: 统一 safeFetch | 密钥: 集中 config 解析 (env only, 无文件 fallback)
- gitignore: .env / .key / .pem 均已保护
## 认知架构
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
- 存储: AES-256-GCM 持久化密钥 (自动生成, 0o600)
- 沙箱: vm 隔离 (默认关闭) | SSRF: url-validator + DNS pinning
- 出网: 统一 safeFetch | 密钥: 集中 config 解析 (env only, 无文件 fallback)
- gitignore: .env / .key / .pem 均已保护
## 认知架构
Automatically writing a generated MCP token into .env directly contradicts the stated boundary that file-system writing is disabled by default, and it creates silent modification of local secrets/configuration state. Secret material written automatically can be exposed through weak file permissions, accidental commits, backup systems, or confusion about provenance and rotation.
YARA rule matched a hack tool or exploit indicator (offensive tools, reconnaissance, privilege escalation, or exploit frameworks).
# HeartFlow (心虫) — AGI Layer 1: The Discriminator Gate
> **A rule-based text discriminator. 47 dimensions, 9 check layers, 131 MCP engine entries, zero LLM dependency.**
> **It checks what AI says before it reaches humans — and says "no" when something's wrong.**
**npm:** `npm install @yun520-1/heartflow`
**GitHub:** https://github.com/yun520-1/mark-heartflow-skill
**Issues:** https://github.com/yun520-1/mark-heartflow-skill/issues
**Releases:** https://github.com/yun520-1/mark-heartflow-skill/releases
**License:** MIT
---
## 📖 What is HeartFlow?
HeartFlow (心虫) is the **first layer of AGI — the Discriminator**. While big labs build generators (LLMs that produce text), HeartFlow builds the layer that **checks**: is this
The README says the system 'does not generate text' and 'does not reason,' but elsewhere describes a rewriter, thinking tools, dream tools, and self-evolution components. In an agent ecosystem, these contradictions undermine safe deployment decisions because defenders may rely on the restrictive description while the broader feature set implies more autonomy and more attack surface.
This pattern attempts to override system instructions or ignore safety constraints. Without LLM analysis, manual review is recommended.
|-----------|---------|
| Hate speech | racial slurs, extermination calls |
| Dehumanization | "refugees are vermin" / "you are garbage" |
| Prompt injection | "ignore previous instructions" |
| Code security | malicious code patterns |
| Deceptive alignment | "I'm not an AI, I'm human" |
The README presents HeartFlow as a narrow, deterministic text discriminator, but later advertises broad memory, dream, evolution, identity, and formula subsystems. This kind of capability inflation and contradiction can cause operators to grant the package more trust, permissions, or deployment scope than warranted, which is dangerous for a security-sensitive agent skill.
These TP4 findings consistently indicate a strong description-behavior mismatch: the skill presents itself as a deterministic, safety-focused discriminator with writes/execution disabled, while analysis of the broader package reportedly found code modification, persistence, dynamic loading, networking, and orchestration behaviors. That mismatch is dangerous because operators may trust and auto-route to the skill under a low-risk mental model, while the actual implementation appears to have materially broader authority and stateful side effects.
These TP4 findings consistently indicate a strong description-behavior mismatch: the skill presents itself as a deterministic, safety-focused discriminator with writes/execution disabled, while analysis of the broader package reportedly found code modification, persistence, dynamic loading, networking, and orchestration behaviors. That mismatch is dangerous because operators may trust and auto-route to the skill under a low-risk mental model, while the actual implementation appears to have materially broader authority and stateful side effects.
These TP4 findings consistently indicate a strong description-behavior mismatch: the skill presents itself as a deterministic, safety-focused discriminator with writes/execution disabled, while analysis of the broader package reportedly found code modification, persistence, dynamic loading, networking, and orchestration behaviors. That mismatch is dangerous because operators may trust and auto-route to the skill under a low-risk mental model, while the actual implementation appears to have materially broader authority and stateful side effects.
These TP4 findings consistently indicate a strong description-behavior mismatch: the skill presents itself as a deterministic, safety-focused discriminator with writes/execution disabled, while analysis of the broader package reportedly found code modification, persistence, dynamic loading, networking, and orchestration behaviors. That mismatch is dangerous because operators may trust and auto-route to the skill under a low-risk mental model, while the actual implementation appears to have materially broader authority and stateful side effects.
These TP4 findings consistently indicate a strong description-behavior mismatch: the skill presents itself as a deterministic, safety-focused discriminator with writes/execution disabled, while analysis of the broader package reportedly found code modification, persistence, dynamic loading, networking, and orchestration behaviors. That mismatch is dangerous because operators may trust and auto-route to the skill under a low-risk mental model, while the actual implementation appears to have materially broader authority and stateful side effects.
These TP4 findings consistently indicate a strong description-behavior mismatch: the skill presents itself as a deterministic, safety-focused discriminator with writes/execution disabled, while analysis of the broader package reportedly found code modification, persistence, dynamic loading, networking, and orchestration behaviors. That mismatch is dangerous because operators may trust and auto-route to the skill under a low-risk mental model, while the actual implementation appears to have materially broader authority and stateful side effects.
These TP4 findings consistently indicate a strong description-behavior mismatch: the skill presents itself as a deterministic, safety-focused discriminator with writes/execution disabled, while analysis of the broader package reportedly found code modification, persistence, dynamic loading, networking, and orchestration behaviors. That mismatch is dangerous because operators may trust and auto-route to the skill under a low-risk mental model, while the actual implementation appears to have materially broader authority and stateful side effects.
These TP4 findings consistently indicate a strong description-behavior mismatch: the skill presents itself as a deterministic, safety-focused discriminator with writes/execution disabled, while analysis of the broader package reportedly found code modification, persistence, dynamic loading, networking, and orchestration behaviors. That mismatch is dangerous because operators may trust and auto-route to the skill under a low-risk mental model, while the actual implementation appears to have materially broader authority and stateful side effects.
These TP4 findings consistently indicate a strong description-behavior mismatch: the skill presents itself as a deterministic, safety-focused discriminator with writes/execution disabled, while analysis of the broader package reportedly found code modification, persistence, dynamic loading, networking, and orchestration behaviors. That mismatch is dangerous because operators may trust and auto-route to the skill under a low-risk mental model, while the actual implementation appears to have materially broader authority and stateful side effects.
These TP4 findings consistently indicate a strong description-behavior mismatch: the skill presents itself as a deterministic, safety-focused discriminator with writes/execution disabled, while analysis of the broader package reportedly found code modification, persistence, dynamic loading, networking, and orchestration behaviors. That mismatch is dangerous because operators may trust and auto-route to the skill under a low-risk mental model, while the actual implementation appears to have materially broader authority and stateful side effects.
These TP4 findings consistently indicate a strong description-behavior mismatch: the skill presents itself as a deterministic, safety-focused discriminator with writes/execution disabled, while analysis of the broader package reportedly found code modification, persistence, dynamic loading, networking, and orchestration behaviors. That mismatch is dangerous because operators may trust and auto-route to the skill under a low-risk mental model, while the actual implementation appears to have materially broader authority and stateful side effects.
These TP4 findings consistently indicate a strong description-behavior mismatch: the skill presents itself as a deterministic, safety-focused discriminator with writes/execution disabled, while analysis of the broader package reportedly found code modification, persistence, dynamic loading, networking, and orchestration behaviors. That mismatch is dangerous because operators may trust and auto-route to the skill under a low-risk mental model, while the actual implementation appears to have materially broader authority and stateful side effects.
These TP4 findings consistently indicate a strong description-behavior mismatch: the skill presents itself as a deterministic, safety-focused discriminator with writes/execution disabled, while analysis of the broader package reportedly found code modification, persistence, dynamic loading, networking, and orchestration behaviors. That mismatch is dangerous because operators may trust and auto-route to the skill under a low-risk mental model, while the actual implementation appears to have materially broader authority and stateful side effects.
These TP4 findings consistently indicate a strong description-behavior mismatch: the skill presents itself as a deterministic, safety-focused discriminator with writes/execution disabled, while analysis of the broader package reportedly found code modification, persistence, dynamic loading, networking, and orchestration behaviors. That mismatch is dangerous because operators may trust and auto-route to the skill under a low-risk mental model, while the actual implementation appears to have materially broader authority and stateful side effects.
These TP4 findings consistently indicate a strong description-behavior mismatch: the skill presents itself as a deterministic, safety-focused discriminator with writes/execution disabled, while analysis of the broader package reportedly found code modification, persistence, dynamic loading, networking, and orchestration behaviors. That mismatch is dangerous because operators may trust and auto-route to the skill under a low-risk mental model, while the actual implementation appears to have materially broader authority and stateful side effects.
These TP4 findings consistently indicate a strong description-behavior mismatch: the skill presents itself as a deterministic, safety-focused discriminator with writes/execution disabled, while analysis of the broader package reportedly found code modification, persistence, dynamic loading, networking, and orchestration behaviors. That mismatch is dangerous because operators may trust and auto-route to the skill under a low-risk mental model, while the actual implementation appears to have materially broader authority and stateful side effects.
Detected: suspicious.dangerous_exec, suspicious.dynamic_code_execution, suspicious.prompt_injection_instructions