Back to skill

Security audit

Halo博客管理,文章发布

Security checks for vulnerabilities and agentic risk

Overview

This Halo blog manager has a plausible purpose, but it can send a bearer token and post content to a hardcoded default site if the blog URL is not set, and it can delete posts with weak safeguards.

Review before installing. Set HALO_URL explicitly every time, use a least-privileged Halo token, revoke any token used without HALO_URL set, avoid deletion unless you can verify the target post, and prefer regenerating the lockfile from an HTTPS registry with updated dependencies.

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 (2)

T09 · Insecure Skill Coding Practices

Error
Location
halo.js:18
Finding
Bearer Token and Blog Content Sent to an Undeclared Default Endpoint<![CDATA[ ## Vulnerability Details **File Location**: `halo.js:18-29` **Vulnerability Type**: Insecure default configuration causing credential and data disclosure **Risk Level**: High ### Vulnerable Code ```javascript // 配置 const HALO_URL = process.env.HALO_URL || 'https://yingdong.top'; const HALO_TOKEN = process.env.HALO_TOKEN; if (!HALO_TOKEN) { console.error('请设置 HALO_TOKEN 环境变量'); console.log('HALO_TOKEN=你的token node halo.js publish "标题" "内容"'); process.exit(1); } // 创建axios实例 const axiosInstance = axios.create({ baseURL: HALO_URL, headers: { 'Authorization': `Bearer ${HALO_TOKEN}`, 'Content-Type': 'application/json' } }); ``` ### Technical Analysis The CLI requires `HALO_TOKEN`, but it does not similarly require `HALO_URL`. When the URL is missing, it silently uses the unrelated, hardcoded endpoint `https://yingdong.top`. The Axios instance unconditionally adds the user's bearer token to every request made through it. The same authenticated instance is also passed to the Halo API client. Consequently, invoking any supported operation while `HALO_URL` is absent transmits the token to the hardcoded server. This behavior is not disclosed in the configuration instructions, which present `HALO_URL` as the user's blog address. Publishing additionally transmits the article title, generated HTML content, categories, and tags to that endpoint. ### Attack Path 1. A user obtains a personal access token for their Halo installation. 2. The user sets `HALO_TOKEN` but omits, misspells, or loses the `HALO_URL` environment variable. 3. The CLI silently selects `https://yingdong.top` as its API base URL. 4. The user runs `halo list`, `halo publish`, or `halo delete`. 5. The CLI sends an HTTP request containing `Authorization: Bearer <HALO_TOKEN>` to the hardcoded server. 6. For a publish operation, the request also contains the article title and full content. 7. An operator controlling or observing the destination server ca ...[truncated 880 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Remove the hardcoded fallback and require an explicit URL: ```javascript const HALO_URL = process.env.HALO_URL; const HALO_TOKEN = process.env.HALO_TOKEN; if (!HALO_URL || !HALO_TOKEN) { console.error('HALO_URL and HALO_TOKEN must both be configured.'); process.exit(1); } ``` 2. Parse and validate the supplied URL with the standard `URL` class. 3. Require HTTPS unless the user explicitly enables a documented local-development exception. 4. Reject URLs containing embedded credentials or unsupported protocols. 5. Consider requiring interactive confirmation when connecting to a host for the first time. 6. Configure redirect handling so credentials cannot be forwarded to a different origin. 7. Document the exact destination to which credentials and content will be transmitted. 8. Revoke and replace any token that may already have been used while `HALO_URL` was absent. ]]>

T08 · Insecure Dependencies

Warning
Location
package-lock.json:18
Finding
Dependencies Locked to a Plaintext HTTP Package Mirror<![CDATA[ ## Vulnerability Details **File Location**: `package-lock.json:18-45` **Vulnerability Type**: Insecure dependency transport and non-default supply-chain source **Risk Level**: Medium ### Vulnerable Code ```json "node_modules/@halo-dev/api-client": { "version": "2.22.0", "resolved": "http://mirrors.tencentyun.com/npm/@halo-dev/api-client/-/api-client-2.22.0.tgz", "integrity": "sha512-gJKJWQxG2nzcANrRddED9P0pefmdanWm0+kV3cgGrtqnF6ULnckB4KIKUPmMOwdCBg1QEPQ30Txc9AfYwlu4kQ==", "license": "GPL-3.0", "dependencies": { "qs": "^6.14.0" }, "peerDependencies": { "axios": "^1.12.*" } }, "node_modules/asynckit": { "version": "0.4.0", "resolved": "http://mirrors.tencentyun.com/npm/asynckit/-/asynckit-0.4.0.tgz", "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", "license": "MIT" }, "node_modules/axios": { "version": "1.13.6", "resolved": "http://mirrors.tencentyun.com/npm/axios/-/axios-1.13.6.tgz", "integrity": "sha512-ChTCHMouEe2kn713WHbQGcuYrr6fXTBiu460OTwWrWob16g1bXn4vtz07Ope7ewMozJAnEquLk5lWQWtBig9DQ==", "license": "MIT", "dependencies": { "follow-redirects": "^1.15.11", "form-data": "^4.0.5", "proxy-from-env": "^1.1.0" } } ``` ### Technical Analysis The lockfile resolves the audited dependency set through `http://mirrors.tencentyun.com` rather than an HTTPS registry. The audit found 31 package resolution entries using this plaintext mirror. Plaintext HTTP does not authenticate the package server and does not protect the transport against modification or interception. The included SHA-512 integrity values are an important mitigation: under normal npm behavior, a network attacker cannot transparently substitute arbitrary package contents without triggering an integrity failure. However, HTTP still permits interception, forced failures, stale responses, and denial of service, while use of a non-default mirror expands the project's supply-chain ...[truncated 1488 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Configure npm to use the official HTTPS registry or another explicitly trusted HTTPS registry: ```bash npm config set registry https://registry.npmjs.org/ ``` 2. Delete and regenerate the lockfile from the trusted registry: ```bash rm -rf node_modules package-lock.json npm install ``` 3. Verify that every `resolved` entry uses HTTPS. 4. Retain SHA-512 integrity metadata and use `npm ci` in automated builds. 5. Enforce approved registries in CI and reject lockfile entries using `http:`, unapproved hosts, Git URLs, or local file references. 6. Review lockfile changes during code review, especially changes to `resolved` and `integrity`. 7. Consider dependency provenance verification and automated vulnerability scanning in the release pipeline. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (14)

Known Vulnerable Dependency: axios==1.13.6 — 16 advisory(ies): CVE-2026-44494 (axios Vulnerable to Full Man-in-the-Middle via Prototype Pollution Gadget in `co); CVE-2026-44495 (axios Vulnerable to Credential Theft and Response Hijacking via Prototype Pollut); CVE-2025-62718 (Axios has a NO_PROXY Hostname Normalization Bypass that Leads to SSRF) +13 more

High
Category
Supply Chain
Confidence
90% confidence
Finding
The project pins axios 1.13.6, which the finding reports as having multiple advisories including SSRF/proxy-bypass and prototype-pollution-related issues. In a CLI or agent skill that makes outbound requests, such flaws can enable request forgery, credential leakage, response hijacking, or misuse of internal network access depending on how untrusted input is handled.

Known Vulnerable Dependency: form-data==4.0.5 — 1 advisory(ies): CVE-2026-12143 (form-data: CRLF injection in form-data via unescaped multipart field names and f)

High
Category
Supply Chain
Confidence
87% confidence
Finding
form-data 4.0.5 is reported as vulnerable to CRLF injection through unescaped multipart field names or filenames. If any untrusted input is incorporated into multipart requests, an attacker may manipulate request structure, inject headers, or interfere with downstream parsers.

Known Vulnerable Dependency: axios==1.13.6 — 16 advisory(ies): CVE-2026-44494 (axios Vulnerable to Full Man-in-the-Middle via Prototype Pollution Gadget in `co); CVE-2026-44495 (axios Vulnerable to Credential Theft and Response Hijacking via Prototype Pollut); CVE-2025-62718 (Axios has a NO_PROXY Hostname Normalization Bypass that Leads to SSRF) +13 more

High
Category
Supply Chain
Confidence
98% confidence
Finding
The package declares axios 1.13.6, which the finding identifies as having multiple known advisories, including SSRF and man-in-the-middle/prototype-pollution-related issues. Because this skill appears to manage a blog platform and likely performs authenticated API requests, a vulnerable HTTP client can expose tokens, enable request hijacking, or allow malicious routing behavior depending on how the library is used.

Vague Triggers

Medium
Confidence
94% confidence
Finding
The trigger list includes very broad terms such as "halo", "博客", and "发布文章", which can plausibly appear in normal conversation and cause unintended skill activation. Because this skill can perform state-changing actions against a live blog, accidental invocation could lead to unintended publication or follow-on destructive actions if the agent chains commands.

Missing User Warnings

Medium
Confidence
93% confidence
Finding
The documentation advertises deletion capability and even shows a deletion command, but it does not warn that the action is destructive or recommend confirmation, preview, or safeguards. In an agent setting, this increases the chance that a user or automated workflow triggers irreversible content deletion based on ambiguous keywords or mistaken targeting.

Intent-Code Divergence

Medium
Confidence
94% confidence
Finding
The top-level doc comment says the tool is a "Halo Manager CLI" for "发布文章到Halo博客" and documents a three-step publish flow only. However, the implementation also exposes `list` and `delete` commands, including destructive deletion of post content, which contradicts the stated scope in the documentation rather than merely omitting an implementation detail.

Natural-Language Policy Violations

Medium
Confidence
99% confidence
Finding
The lockfile pins package tarballs to plain HTTP mirrors, which allows a network attacker or malicious intermediary to tamper with downloaded packages despite the presence of integrity hashes. In many package-manager and CI workflows, integrity verification may be bypassed, disabled, or replaced during updates, and use of insecure transport materially increases supply-chain compromise risk.

Natural-Language Policy Violations

Medium
Confidence
99% confidence
Finding
Additional dependency entries also reference plain HTTP package sources, showing the issue is systemic rather than isolated. This broadens exposure to dependency tampering or mirror impersonation during install and update operations.

Natural-Language Policy Violations

Medium
Confidence
99% confidence
Finding
Multiple entries in the lockfile rely on an unsecured HTTP mirror, creating a recurring software supply-chain weakness. If an attacker can intercept traffic or control DNS/routing, they may deliver altered packages or disrupt builds.

Known Vulnerable Dependency: follow-redirects==1.15.11 — 1 advisory(ies): CVE-2026-40895 (follow-redirects leaks Custom Authentication Headers to Cross-Domain Redirect Ta)

Low
Category
Supply Chain
Confidence
82% confidence
Finding
follow-redirects 1.15.11 is reported as leaking custom authentication headers across cross-domain redirects. If this skill sends authenticated HTTP requests and follows attacker-influenced redirects, secrets such as API tokens could be exposed to a different host.

Known Vulnerable Dependency: qs==6.15.0 — 3 advisory(ies): CVE-2026-82417 (qs: Denial of Service via Attacker Controlled isBuffer); CVE-2026-8723 (qs has a remotely triggerable DoS: qs.stringify crashes with TypeError on null/u); CVE-2026-82562 (qs array-limit bypass via bracket-key comma parsing)

Low
Category
Supply Chain
Confidence
77% confidence
Finding
qs 6.15.0 is flagged for several denial-of-service issues involving crafted input during query-string parsing or serialization. The practical risk depends on whether this skill parses attacker-controlled query structures or serializes untrusted nested objects, but the dependency is still vulnerable on its face.

Natural-Language Policy Violations

Low
Confidence
87% confidence
Finding
The description string is written only in Chinese ("Halo博客管理技能"), which indicates a fixed language choice with no indication that users can select their preferred language or locale. Under the stated policy, forcing a specific language without opt-in is a natural-language policy concern.

Unpinned Dependencies

Low
Category
Supply Chain
Content
"author": "",
  "license": "ISC",
  "dependencies": {
    "@halo-dev/api-client": "^2.22.0",
    "axios": "^1.13.6"
  }
}
Confidence
90% confidence
Finding
The dependency uses a caret range (^2.22.0), which allows automatic installation of newer compatible releases. This weakens build reproducibility and can unexpectedly pull in a compromised or breaking upstream version, increasing supply-chain risk for anyone installing the skill.

Unpinned Dependencies

Low
Category
Supply Chain
Content
"license": "ISC",
  "dependencies": {
    "@halo-dev/api-client": "^2.22.0",
    "axios": "^1.13.6"
  }
}
Confidence
95% confidence
Finding
The axios dependency is specified with a caret range (^1.13.6), so installs are not fully deterministic and may resolve to different future patch/minor versions. In the context of a network-facing blog management skill, this increases supply-chain exposure because a malicious or flawed upstream release could affect HTTP request handling and credential-bearing traffic.

Static analysis

Detected: suspicious.env_credential_access

Environment variable access combined with network send.

Critical
Code
suspicious.env_credential_access
Location
halo.js:17