Back to skill

Security audit

XHS Knowledge Retriever

Security checks for vulnerabilities and agentic risk

Overview

This skill is a local Xiaohongshu knowledge-index retriever whose file access and optional JSON output are disclosed and aligned with its purpose.

Install only in an environment where the local XHS knowledge index and output paths are trusted. For stronger reproducibility, pin or lock numpy and sentence-transformers, and pre-cache the embedding model if offline operation is required.

Vulnerability Patterns
  • 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
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Vulnerability Patterns
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (4)

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
87% confidence
Finding

The skill invokes a local Python script and documents capabilities that include environment-variable access plus file reads and writes, but it does not declare any explicit tool scope or permission boundaries. That mismatch can let an agent or runner grant broader access than users expect, increasing the chance of unintended reads from local knowledge stores or writes to arbitrary paths such as the user-provided output location.

Content

No source excerpt is available for this finding.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
93% confidence
Finding

The dependency is specified with a lower-bound range only, which makes builds non-reproducible and allows different environments to install different numpy versions over time. That increases supply-chain risk and makes it difficult to verify whether a deployed version includes known vulnerabilities or breaking changes.

Content

Scanner excerpt · requirements.txt (reported line 1)May include surrounding context.

text
numpy>=2.0.0
sentence-transformers>=5.1.0

Unverifiable Dependency: numpy has 16 known advisory(ies) (CVE-2014-1859 (Numpy arbitrary file write via symlink attack); CVE-2021-41495 (NumPy NULL Pointer Dereference); CVE-2021-33430 (NumPy Buffer Overflow (Disputed)) +13 more), but the manifest does not pin a version, so it is unknown whether the installed release is affected

Low
Category
Supply Chain
Confidence
88% confidence
Finding

numpy has known advisories, and because the manifest does not pin an exact version, there is no reliable way to determine whether the installed version is affected. In this skill context, the package supports local embedding/retrieval work rather than direct privileged system operations, so the risk is real but not elevated by the application behavior described.

Content

No source excerpt is available for this finding.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
92% confidence
Finding

The sentence-transformers package is also unpinned, so installations may resolve to different versions depending on when and where the skill is deployed. This weakens reproducibility and increases exposure to accidental breakage or malicious/surprising upstream releases in the dependency chain.

Content

Scanner excerpt · requirements.txt (reported line 2)May include surrounding context.

text
numpy>=2.0.0
sentence-transformers>=5.1.0

Static analysis

No suspicious patterns detected.