Back to skill

Security audit

Macro-Information

Security checks for vulnerabilities and agentic risk

Overview

The skill appears to be a macroeconomic news lookup tool, but it handles API keys in ways that could expose them.

Review before installing. Use this only if you trust the FEEDAX endpoint and can tolerate API key exposure risk; do not paste API keys into chat, do not let the agent print `.env`, prefer a scoped environment variable or secret store, avoid `--api-key` in shell history, and use `--no-output` when you do not want local result files.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • 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
Findings (4)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/query_macro_information.py:43
Finding

API Credential and Search Data Transmitted over Plaintext HTTP

Content
View full analysis

Vulnerability Details

File Location: scripts/query_macro_information.py:43, 73, 98-106
Vulnerability Type: Plaintext transmission and redundant disclosure of authentication credentials
Risk Level: High

Vulnerable Code

python
FEEDAX_BASE_URL = "http://221.6.15.90:18011"
python
url = f"{FEEDAX_BASE_URL}/data-service/v1/news/macro/external/query?apiKey={api_key}"
python
params = {"apiKey": api_key}

headers = {
    "Content-Type": "application/json",
    "x-api-key": api_key
}

try:
    response = requests.post(url, params=params, headers=headers, json=payload, timeout=60)

Technical Analysis

The script sends an API credential and the user's search parameters to a bare IP address over unencrypted HTTP. HTTP provides neither transport confidentiality nor server authentication, allowing an on-path party to read or modify the request and response.

The credential is unnecessarily transmitted through three locations:

  1. Directly in the constructed URL query string.
  2. Again through the params argument.
  3. In the x-api-key request header.

URL-based credentials are especially vulnerable to disclosure because complete URLs may be recorded by proxies, HTTP servers, monitoring systems, exception output, and diagnostic tooling. The API key is required for the declared news-query functionality, but plaintext and redundant transmission exceed the minimum disclosure necessary.

Attack Path

  1. A user provides a valid FEEDAX API key through the command line, environment, or configuration file.
  2. The Skill constructs a request to http://221.6.15.90:18011.
  3. The API key is included in the URL and header while the user’s search keyword is included in the JSON body.
  4. An attacker controlling or monitoring a network segment, proxy, gateway, or compromised access point captures the unencrypted traffic.
  5. The attacker extracts the API key and search data or ...[truncated 519 chars]
Remediation
View remediation

Remediation Suggestions

  1. Replace the plaintext endpoint with an authenticated HTTPS hostname:
    python
    FEEDAX_BASE_URL = "https://api.feedax.cn"
    
  2. Confirm that TLS certificate verification remains enabled and never set verify=False.
  3. Send the API key exactly once, preferably through an authorization header:
    python
    headers = {
        "Content-Type": "application/json",
        "Authorization": f"Bearer {api_key}",
    }
    response = requests.post(
        f"{FEEDAX_BASE_URL}/data-service/v1/news/macro/external/query",
        headers=headers,
        json=payload,
        timeout=60,
    )
    
  4. Remove the key from both the URL string and params.
  5. Reject endpoint overrides that use non-HTTPS schemes.
  6. Redact credentials from exception messages, debug output, telemetry, and request logs.
  7. Rotate any API keys that may already have been transmitted over the plaintext endpoint.

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
SKILL.md:22
Finding

Skill Instructions Expose the Entire Environment File

Content
View full analysis

Vulnerability Details

File Location: SKILL.md:22-27
Vulnerability Type: Overbroad local secret disclosure
Risk Level: Medium

Vulnerable Instruction

bash
cat .env

Technical Analysis

The declared requirement is to determine whether one service API key is configured. Printing the complete .env file is not necessary for that purpose and violates least-privilege principles. Environment files commonly contain unrelated database passwords, access tokens, cloud credentials, signing keys, or other sensitive configuration.

Executing cat .env exposes all such values to the terminal, agent context, conversation transcript, command history, screenshots, and any surrounding logging or monitoring infrastructure.

The instructions are also inconsistent about the credential name. A later check references GOLAXY_API_KEY, while the implementation reads FEEDAX_API_KEY. This mismatch may encourage additional inspection or disclosure of the file when the documented check fails.

Attack Path

  1. The Skill is invoked for a macroeconomic news query.
  2. The agent follows the prerequisite instruction and executes cat .env.
  3. Every value in .env, including credentials unrelated to FEEDAX, is printed.
  4. The output enters the agent context or is retained in terminal and platform logs.
  5. A party with access to those records obtains the exposed credentials and uses them against their corresponding services.

Impact Assessment

The immediate scope includes every secret stored in the project’s .env file, not merely the FEEDAX key needed by the Skill. The ultimate privileges depend on the unrelated credentials present and could exceed the Skill’s legitimate news-query permissions. No evidence shows that the Skill itself persists or transmits the full file, but the instruction creates an unnecessary disclosure channel.

Remediation
View remediation

Remediation Suggestions

  1. Remove all instructions that print the complete .env file.
  2. Check only whether the required variable exists, without displaying its value:
    bash
    if [ -n "${FEEDAX_API_KEY:-}" ]; then
      echo "FEEDAX_API_KEY is configured"
    else
      echo "FEEDAX_API_KEY is not configured"
    fi
    
  3. If a .env file must be inspected, parse only the required variable and return a Boolean configuration status rather than its value.
  4. Standardize the documentation and implementation on FEEDAX_API_KEY.
  5. Do not ask users to paste API keys into a conversation. Direct them to a protected environment variable or secret manager.
  6. Ensure .env and scripts/config.json are excluded from version control and have restrictive filesystem permissions.

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/query_macro_information.py:130
Finding

Spreadsheet Formula Injection in Generated CSV Files

Content
View full analysis

Vulnerability Details

File Location: scripts/query_macro_information.py:130-158
Vulnerability Type: CSV formula injection from untrusted API fields
Risk Level: Medium

Vulnerable Code

python
row = [
    publish_date_str,
    item.get('title', '') or '',
    item.get('summary', '') or '',
    item.get('content', '') or '',
    item.get('source', '') or '',
    item.get('macroEconomyResult', '') or '',
    item.get('macroTag', '') or '',
    (item.get('areaResult') or ''),
    item.get('newsImportanceLevel', '') or '',
    str(item.get('heatScores', 0) or 0),
    str(item.get('viewNum', 0) or 0),
    str(item.get('forwardedNum', 0) or 0),
    item.get('url', '') or ''
]
row = [str(v).replace(',', ' ').replace('\n', ' ') for v in row]
f.write(','.join(row) + '\n')

Technical Analysis

News fields returned by the external API are written directly into a CSV file. Replacing commas and newline characters does not neutralize spreadsheet formulas. Spreadsheet programs may interpret cells beginning with =, +, -, or @ as executable formulas.

Consequently, a malicious or compromised upstream news record can place formula syntax in fields such as title, summary, content, source, or url. The generated file appears to be an ordinary data export, increasing the likelihood that a user will open it in Excel, LibreOffice Calc, or another spreadsheet application.

Manual string concatenation is also not standards-compliant CSV serialization and does not safely handle quoting or carriage returns.

Attack Path

  1. An attacker causes a news record available through the upstream service to contain a field such as =HYPERLINK(...) or another spreadsheet formula.
  2. The Skill retrieves that record from the API.
  3. generate_csv writes the malicious field without formula neutralization.
  4. The user opens the generated CSV file in a spreadsheet application.
  5. The sp ...[truncated 683 chars]
Remediation
View remediation

Remediation Suggestions

  1. Use Python’s csv module instead of manual string concatenation.
  2. Treat every textual value received from the API as untrusted.
  3. Neutralize cells whose first non-whitespace character is =, +, -, or @, for example by prefixing an apostrophe.
  4. Normalize carriage returns as well as newline characters.
  5. Apply explicit type validation to numeric fields.
  6. Warn users that exported files contain externally sourced content.

Example hardening:

python
import csv

def safe_spreadsheet_cell(value):
    text = "" if value is None else str(value)
    if text.lstrip().startswith(("=", "+", "-", "@")):
        return "'" + text
    return text

with open(output_path, "w", encoding="utf-8", newline="") as output:
    writer = csv.writer(output)
    writer.writerow(headers)
    for item in data_list:
        writer.writerow([safe_spreadsheet_cell(value) for value in row])

T08 · Insecure Dependencies

Note
Location
README.md:57
Finding

Unpinned Third-Party Dependency Installation

Content
View full analysis

Vulnerability Details

File Location: README.md:57-61
Vulnerability Type: Unconstrained dependency retrieval
Risk Level: Low

Vulnerable Instruction

bash
pip install requests

Technical Analysis

The installation instructions retrieve the latest package version resolved by the user’s configured pip index. No reviewed version, lock file, hash, or trusted index is specified. This makes installation non-reproducible and leaves the result dependent on mutable external package infrastructure and local pip configuration.

The package name is the legitimate requests package, and the audited files contain no evidence of deliberate typosquatting or dependency confusion. The risk arises from unconstrained supply-chain retrieval rather than from a confirmed malicious package.

Attack Path

  1. A user follows the documented installation command.
  2. Pip resolves requests and its transitive dependencies using the currently configured package index or mirror.
  3. A compromised index, malicious mirror, substituted package artifact, or unexpectedly incompatible future release is selected.
  4. The package is installed into the active Python environment.
  5. Malicious or compromised package code can execute with the permissions of the installing user when imported or during applicable package installation behavior.

Impact Assessment

A compromised dependency could obtain the same filesystem, environment-variable, and network privileges as the Python process, including access to the FEEDAX API key when the script runs. Under normal use with the official package index, this finding primarily affects reproducibility and supply-chain assurance rather than demonstrating active compromise.

Remediation
View remediation

Remediation Suggestions

  1. Pin a reviewed requests version and its transitive dependencies in a lock file.
  2. Generate and verify package hashes, for example through a hash-locked requirements file.
  3. Install dependencies in an isolated virtual environment.
  4. Document the trusted package index explicitly.
  5. Use automated dependency scanning and a controlled process for updating pinned versions.
  6. Prefer a command such as:
    bash
    python -m pip install --require-hashes -r requirements.txt
    
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (19)

Credential Access

High
Category
Privilege Escalation
Confidence
97% confidence
Finding

The documented use of cat .env would expose the full contents of a credential file, not just the relevant key's presence. In an agent context, this is dangerous because .env often contains multiple unrelated secrets that could be surfaced, logged, or used beyond the task.

Content

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

查看 .env 文件是否存在且包含有效的 API Key:

bash
cat .env

如果未配置

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The skill tells the agent to ask the user for an API key and 'remember' it, which is inappropriate for a news-query skill and creates a direct credential collection path in natural language. This can lead to users disclosing secrets into chat history or agent memory, where they may be retained, exposed, or reused beyond the user's intent.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The instruction to tell the assistant an API key 'so I can remember it' encourages secret sharing in chat without any safety warning. This is especially dangerous because conversational channels and memory systems are not appropriate secret-entry mechanisms and may expose credentials to logs, future prompts, or operators.

Content

No source excerpt is available for this finding.

Ssd 3

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The assistant is explicitly told to collect a user's API key and remember it, which is a direct sensitive-data collection anti-pattern. This can result in credential retention in memory, transcripts, analytics, or downstream tooling and is unjustified by the skill's business purpose.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The workflow both reads local secret configuration and instructs the agent to ask the user to provide the API key if missing, again without a warning against exposing credentials. This creates multiple opportunities for secret disclosure through chat or unintended local inspection.

Content

No source excerpt is available for this finding.

Credential Access

High
Category
Privilege Escalation
Confidence
96% confidence
Finding

Using cat .env | grep GOLAXY_API_KEY still instructs access to local secret storage and may expose credential values in command output or logs. For this skill, credential-file inspection is unnecessary and increases the risk of unauthorized secret access.

Content

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

Step 1: 检查 API Key 配置

bash
cat .env | grep GOLAXY_API_KEY
  • 如果返回空或文件不存在,提示用户:"未配置 API Key,请前往 https://www.golaxy.com.cn 申请,完成后请告诉我 API Key 以便我记住"

Ssd 3

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The workflow step operationalizes credential collection by instructing the assistant to request and remember the user's API key when not configured. This makes the secret-handling flaw actionable and likely to occur during normal use.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The script uses a plain HTTP base URL and sends the API key in both the query string and request headers, exposing credentials and request contents to interception or modification by anyone on the network path. Because this skill is specifically designed to call an external service with authentication, the insecure transport materially increases risk of credential theft, request tampering, and unauthorized API use.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The README recommends passing the API key on the command line and storing it in a config file without warning that command-line arguments may be exposed via shell history or process listings, and that config files can persist secrets on disk. In this skill context, the key grants access to a paid external intelligence service, so credential exposure can lead to unauthorized API usage, billing abuse, and potential account compromise.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
93% confidence
Finding

The skill documents use of environment access, local file reads/writes, and network access but declares no explicit tool scope or permission boundaries. That increases the chance an agent will exercise broad capabilities implicitly, including secret reads and file persistence, without least-privilege controls.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The skill provides directions for inspecting and editing .env-based secrets but does not pair that with strong guidance about sensitive credential handling. This normalizes direct secret exposure and can lead agents or users to reveal or mishandle API keys during setup.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The skill's stated role is information retrieval and analysis, but it also instructs automatic persistence of all returned data to local CSV and Markdown files. This broadens the data-handling scope and can create unnecessary retention of potentially sensitive or proprietary query results on disk.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

Automatically saving all results to local files without an explicit warning or consent creates an avoidable persistence risk. Users may not expect that their searches and downloaded content will be written to disk, where other processes or users could access them later.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The execution flow directs the agent to inspect local credential configuration files to determine whether an API key exists. For a macro-news lookup skill, reading .env is broader than the user intent and creates unnecessary exposure of local secrets unrelated to the request.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The skill expands from query logic into shell command construction and execution, which introduces command-execution behavior not clearly bounded by the manifest. Even if intended for convenience, adding shell execution materially increases risk if user input is ever interpolated into commands or if the agent can access the broader host environment.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The script's description, help text, examples, and user-facing messages are all presented only in Chinese. Under the stated policy, forcing a specific language without user opt-in is a natural-language policy violation unless the locale constraint is explicitly justified.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
80% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · scripts/query_macro_information.py (reported line 106)May include surrounding context.

python
}
    
    try:
        response = requests.post(url, params=params, headers=headers, json=payload, timeout=60)
        response.raise_for_status()
        return response.json()
    except requests.exceptions.RequestException as e:

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
89% confidence
Finding

For markdown files, findings should cover omitted warnings about behaviors that could affect user data or system state. The README states that the skill generates CSV and MD output files by default, but it presents this as a feature without a clear user warning that local files will be created unless --no-output is used.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
85% confidence
Finding

This code persists API response fields including title, summary, full content, source, and URLs into local files. Although file generation is part of the script's functionality, there is no explicit disclosure in the runtime messaging or inline comments warning users that external content will be saved to disk by default unless --no-output is used.

Content

No source excerpt is available for this finding.