Back to skill

Security audit

daily-guide

Security checks for vulnerabilities and agentic risk

Overview

This skill is a Chinese daily almanac/weather guide whose local profile use and weather lookups are mostly disclosed and fit its stated purpose.

Before installing, understand that this skill stores birth/profile details locally, reads that profile for personalization, and contacts third-party weather/almanac services; set DAILY_GUIDE_CITY to avoid implicit IP-based weather lookup and review the npm dependency source if supply-chain controls matter to you.

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

T08 · Insecure Dependencies

Note
Location
assets/package-lock.json:13
Finding

Dependency Retrieved from an Unofficial Package Registry Mirror

Content
View full analysis

Vulnerability Details

File Location: assets/package-lock.json:13-20
Vulnerability Type: Third-party dependency supply-chain risk
Risk Level: Low

Vulnerable Code

json
"node_modules/lunar-javascript": {
  "version": "1.7.7",
  "resolved": "https://registry.npmmirror.com/lunar-javascript/-/lunar-javascript-1.7.7.tgz",
  "integrity": "sha512-u/KYiwPIBo/0bT+WWfU7qO1d+aqeB90Tuy4ErXenr2Gam0QcWeezUvtiOIyXR7HbVnW2I1DKfU0NBvzMZhbVQw==",
  "license": "MIT"
}

The associated installation instruction appears at SKILL.md:22-26:

bash
cd <skill directory>/assets
npm install   # Install dependencies on first use
node init-bazi.js
node daily-guide.js [YYYY-MM-DD] [--matter=repair-phone]

Technical Analysis

The lockfile directs npm to download lunar-javascript from registry.npmmirror.com, a third-party registry mirror, rather than the canonical npm registry. Both executable scripts subsequently load this dependency through require('lunar-javascript'), so installed dependency code executes with the privileges of the user running the Skill.

The SHA-512 integrity value substantially mitigates mirror-only artifact substitution: npm should reject a downloaded archive whose content does not match the recorded hash. Nevertheless, relying on an unofficial distribution endpoint expands the supply-chain trust boundary. A malicious or compromised project update that changes both the resolved URL and integrity value could cause users following the documented installation process to install modified code.

No evidence was found that the currently locked lunar-javascript artifact is malicious. This finding concerns the unsafe dependency source and associated supply-chain exposure.

Attack Path

  1. An attacker compromises the third-party mirror or causes a malicious lockfile update to be distributed.
  2. For a modified artifact to pass npm integrity verification, the distributed l ...[truncated 1192 chars]
Remediation
View remediation

Remediation Suggestions

  1. Regenerate package-lock.json using the canonical npm registry:
    bash
    npm config set registry https://registry.npmjs.org/
    rm package-lock.json
    npm install --package-lock-only
    
  2. Review the regenerated lockfile and verify that every resolved URL uses an approved registry.
  3. Pin the dependency to an exact reviewed version in package.json, rather than using a compatible-version range:
    json
    "lunar-javascript": "1.7.7"
    
  4. Change installation documentation to recommend npm ci, which installs exactly the dependency graph recorded in the lockfile:
    bash
    npm ci
    
  5. Retain npm integrity hashes and validate lockfile changes during code review.
  6. Add CI policy checks that reject dependencies resolved from unapproved registries.
  7. Where practical, generate and review a software bill of materials and run dependency vulnerability scanning before release.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (10)

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
91% confidence
Finding

The skill instructs operators to run shell commands (npm install, node ...) and relies on environment/configuration, but it does not declare any explicit tool scope or execution permissions. This creates an authorization and review gap: an agent or host may execute code-capable actions without a narrowly declared boundary, increasing the risk of unintended command execution or dependency-related compromise.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The trigger phrases are broad and match ordinary queries like '今天适合做什么' or '今天运气怎么样', which can cause the skill to activate in situations where the user did not intend astrology- or profile-based processing. In context, this matters more because the skill may use personalized Bazi data and weather/location inputs, so over-triggering can lead to unnecessary use of sensitive personal context or irrelevant behavioral steering.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The skill description and behavior are written to respond in Chinese without confirming the user's language preference. This is primarily a trust, usability, and consent issue, but it can become a safety concern if users misunderstand personalized guidance or data-use disclosures because they are delivered in a language they did not request.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The skill reads sensitive personal astrology/profile data from the user's home directory and, when enabled, from a legacy memory path outside the skill directory. That exceeds the minimum data needed for a generic daily guide and creates a privacy boundary violation, especially because the file may contain broader personal details and is loaded automatically without explicit runtime consent.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill automatically reads personal profile data from local files, including a home-directory profile and an optional legacy memory file, without informing the user at execution time. Even if intended for personalization, silent access to personal data is risky because users may not expect this skill to inspect files outside its own directory or to ingest more data than required.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The weather lookup sends a request to wttr.in and, when no city is configured, relies on IP-based geolocation, which exposes location-related metadata to a third party. This occurs without a user-facing warning, consent flow, or local-only fallback, so users may unknowingly disclose approximate location when invoking a seemingly local advisory skill.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

This JavaScript file contains all user-facing prompts, usage text, and status messages exclusively in Chinese, including the interactive flow and CLI error/help output. Under the stated policy, forcing a specific language without user opt-in is a natural-language policy violation unless the locale restriction is explicitly documented and justified, which is not present here.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
81% confidence
Finding

The interactive guidance tells users '信息只保存在本地 bazi.json,不上传', implying a fixed local file behavior. However, the actual output path is controlled by DAILY_GUIDE_BAZI at L017 and later written at L138-L152 / L184-L186, so the script may write to an arbitrary caller-specified location rather than the expected local default path.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

The usage section states that running init-bazi.js generates a local bazi.json file, and earlier text says the personal profile is stored locally in bazi.json. Line L101 instead says the user Bazi profile is in memory/bazi.md, which is an active contradiction about data location and storage format.

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 caret range (^1.7.7), which allows newer compatible releases to be installed automatically. This weakens build reproducibility and increases supply-chain risk because a compromised or faulty upstream release could be pulled in without an explicit review; in this skill, the package appears to be used for calendar/lunar date logic, so the context does not make the issue especially dangerous but it remains a real dependency hygiene problem.

Content

Scanner excerpt · assets/package.json (reported line 14)May include surrounding context.

json
"license": "ISC",
  "type": "commonjs",
  "dependencies": {
    "lunar-javascript": "^1.7.7"
  }
}