Back to skill

Security audit

AI新闻

Security checks for vulnerabilities and agentic risk

Overview

This news skill mostly does what it claims, but it asks for broad file and command access and contains mismatched database-routing text that could cause unsafe or unintended use.

Review this before installing. It is not clearly malicious, but it should be narrowed to news-only activation, remove database/SQL wording, avoid local file access, replace shell curl templates with a scoped HTTP request mechanism, and explicitly disclose that only minimal date or article ID parameters are sent to api.cjiot.cc.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • 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
SKILL.md:47
Finding

Shell Command Injection Through Unsanitized API Parameters

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, line 47
Vulnerability Type: Shell command injection
Risk Level: High

Vulnerable Code Snippet:

bash
curl -s "https://api.cjiot.cc/api/v1/daily?date={current_date}"

The original placeholder represents the current date derived from the request context. Similar API templates use a user-selected date and article identifier at lines 75 and 99.

Technical Analysis

The Skill directs the Agent to construct and execute a shell command containing a substituted date value. Although the document states that dates must use the YYYY-MM-DD format, it does not define an enforceable validation procedure before invoking exec.

If raw or insufficiently validated user input replaces the placeholder, an attacker can supply quote-breaking shell syntax. Because the value is placed inside double quotes, input containing a double quote followed by shell separators could terminate the URL argument and introduce an additional command.

The same underlying concern applies to the article-detail template at line 99 because the document does not specify a strict numeric or UUID allowlist for article_id. The document's later recommendation to avoid concatenating user input is descriptive only and does not enforce safe execution.

Attack Path

  1. An attacker asks for news using a crafted date or article reference containing shell metacharacters.
  2. The Agent extracts the attacker-controlled value without strict allowlist validation.
  3. The value is substituted into the documented curl command template.
  4. The Agent invokes the resulting string through the declared exec capability.
  5. The shell interprets the injected separators and executes the attacker's additional command with the Agent process's privileges.

Exploitation depends on the hosting Agent performing direct textual substitution and shell execution rather than independently validating and safely encod ...[truncated 482 chars]

Remediation
View remediation

Remediation Suggestions

  1. Replace shell-based curl execution with a structured HTTPS client that separates the URL, path, and query parameters.
  2. Validate dates with a strict calendar parser after enforcing the exact YYYY-MM-DD syntax. Reject invalid dates rather than attempting to normalize them.
  3. Define and enforce an allowlist for article identifiers, such as digits only or a precisely specified UUID format.
  4. Apply URL encoding to every query and path parameter.
  5. If a command-line client is unavoidable, invoke it through an argument-array API without a shell. Never build a command by concatenating user-derived strings.
  6. Allowlist the destination scheme, hostname, port, and API paths.
  7. Add negative tests covering quotes, command separators, substitutions, newlines, traversal sequences, and malformed percent encoding.

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
SKILL.md:19
Finding

Excessive Read and Command-Execution Capabilities

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 19-21
Vulnerability Type: Excessive tool permissions and violation of least privilege
Risk Level: Medium

Vulnerable Code Snippet:

yaml
tools:
- read
- exec

Technical Analysis

The Skill's stated purpose is to retrieve and display news from a fixed HTTPS API. Nevertheless, it requests generic local-file reading and command-execution capabilities. Local file access is not required for the documented news workflow, while unrestricted command execution is substantially broader than the outbound HTTP access needed to contact the API.

These permissions increase the consequences of unsafe parameter handling, model manipulation, or malicious content received from the external service. The document claims that commands should run in a sandbox and use a command allowlist, but it does not define or technically enforce either control.

Attack Path

  1. The Skill is installed or activated on an Agent platform.
  2. The platform grants the declared read and exec tools.
  3. Attacker-controlled input, compromised API content, or unsafe command construction influences the Agent's tool use.
  4. The Agent uses the unnecessarily broad tools to access local files or execute commands outside the minimum news-retrieval workflow.
  5. Data or system resources accessible to the Agent process may be exposed or modified.

This path is conditional on the hosting platform granting the requested capabilities without additional policy restrictions. The reviewed file does not itself contain instructions to read sensitive files or escalate operating-system privileges.

Impact Assessment

The affected scope includes files readable by the Agent and commands permitted by its runtime environment. In an inadequately sandboxed deployment, misuse could expose configuration files or environment data and could modify resources writable by the Agent. Strong platform sand ...[truncated 100 chars]

Remediation
View remediation

Remediation Suggestions

  1. Remove the read capability because the documented workflow does not require local-file access.
  2. Replace generic exec access with a restricted HTTP-request tool.
  3. Allowlist only HTTPS requests to api.cjiot.cc on the expected port and approved /api/v1/daily and /api/v1/articles/ paths.
  4. Block redirects to unapproved hosts and private network addresses.
  5. If exec must remain available, enforce a sandbox, an executable allowlist, fixed argument structures, filesystem isolation, network restrictions, and a non-privileged runtime identity.
  6. Ensure that external API responses are treated as untrusted data and cannot introduce new Agent instructions or tool calls.
  7. Document the precise reason for every requested capability and deny undeclared operations by default.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • 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 (8)

Vague Triggers

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The invocation condition is overly broad and unrelated to the stated news domain, telling agents to use the skill when database or SQL work is needed. Broad trigger conditions can cause inappropriate auto-selection in high-sensitivity contexts, leading to unnecessary external requests, misuse of exec-capable tooling, and user confusion about what data leaves the system.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The manifest description claims the skill should be used for database operations, SQL queries, and data storage management, which does not match the rest of the file's news-fetching behavior. This kind of capability/intent mismatch can cause an agent to invoke the skill in unrelated contexts, expanding data exposure and increasing the chance that sensitive user content is routed to an external service unexpectedly.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The inline capability description again promotes unrelated database operations despite the skill being framed as a news tool. Contradictory capability text can manipulate routing and user expectations, causing the skill to be selected for tasks involving structured data or sensitive records that it should never handle.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
85% confidence
Finding

The description states "支持中文交互" while the overall skill metadata and instructions do not offer an explicit language choice or explain that the skill is region- or language-specific by design. This can be a natural-language policy concern when a skill appears to force a locale without user opt-in.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

Phrases like "今天有什么新闻" and "查看每日新闻" are generic natural-language requests without any explicit skill boundary or invocation constraint. Because the document does not provide exclusion conditions or a narrow activation context, these broad phrases could lead to unintended invocation collisions.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
78% confidence
Finding

The skill performs outbound requests to a third-party domain, which is expected for a news-fetching tool, but still represents external data transmission. In this context the danger is increased by the mismatched invocation guidance and broad capabilities elsewhere, because the agent could send requests in contexts unrelated to public news lookup and potentially leak unnecessary user context.

Content

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

md
**处理步骤:**

1. 获取当前日期(格式:YYYY-MM-DD)
2. 调用 API:`curl -s "https://api.cjiot.cc/api/v1/daily?date={当前日期}"`
3. 解析返回的新闻列表
4. 按热度排序展示前 10 条新闻摘要

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
84% confidence
Finding

The skill instructs the agent to construct and send external API requests but does not clearly disclose that user-provided query content or derived context may be transmitted to a third-party service. This creates a privacy and consent risk, especially if the skill is invoked inappropriately due to the overly broad routing text elsewhere in the file.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The skill advertises file handling and command execution capabilities that are not necessary for a news API reader. Unjustified broad capabilities violate least privilege and make the skill more dangerous if auto-invoked, because an agent may permit local file access or shell execution beyond what is needed to retrieve remote news data.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.