Back to skill

Security audit

Calendar - 万年历查询

Security checks for vulnerabilities and agentic risk

Overview

This skill is a straightforward calendar lookup integration, but users should understand it sends calendar requests and an API key to JisuAPI.

Install only if you are comfortable using JisuAPI for calendar lookups. Use a dedicated, low-privilege JISU_API_KEY if possible, watch quota or billing exposure, and avoid sending sensitive free-form context because the script is intended to transmit calendar query parameters to the provider.

Vulnerability Patterns
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (1)

T09 · Insecure Skill Coding Practices

Warning
Location
calendar.py:21
Finding

API Key Transmitted in URL Query Parameters

Content
View full analysis

Vulnerability Details

File Location: calendar.py:21-30 and calendar.py:62-65
Vulnerability Type: Sensitive credential exposure through URL query parameters
Risk Level: Medium

Vulnerable Code

python
def query_calendar(appkey: str, req: dict):
    params = {"appkey": appkey}

    date = req.get("date")
    if not date:
        return {"error": "missing_param", "message": "date is required"}
    params["date"] = date

    islunar = req.get("islunar")
    if islunar is not None:
        params["islunar"] = islunar
    islunarmonth = req.get("islunarmonth")
    if islunarmonth is not None:
        params["islunarmonth"] = islunarmonth

    try:
        resp = requests.get(CALENDAR_QUERY_URL, params=params, timeout=10)
python
def query_holiday(appkey: str):
    params = {"appkey": appkey}

    try:
        resp = requests.get(CALENDAR_HOLIDAY_URL, params=params, timeout=10)

Technical Analysis

Both API operations place JISU_API_KEY in the params dictionary passed to requests.get. The requests library serializes these parameters into the request URL, producing a URL similar to:

text
https://api.jisuapi.com/calendar/query?appkey=SECRET&date=2015-10-22

HTTPS protects the URL while it is in transit between the client and the destination server, but it does not prevent the complete URL from being recorded at either endpoint or by trusted infrastructure. Query strings may be retained in application diagnostics, HTTP client debugging output, reverse-proxy logs, API gateway logs, monitoring systems, exception reports, or upstream access logs.

The project does not itself enable request logging, so exploitation depends on another component recording or exposing request URLs. Nevertheless, placing a reusable credential in a URL unnecessarily increases its exposure surface compared with sending it in an authorization header or request body.

A

...[truncated 1109 chars]

Remediation
View remediation

Remediation Suggestions

  1. Prefer an API authentication header if the provider supports one:

    python
    headers = {"Authorization": f"Bearer {appkey}"}
    resp = requests.get(
        CALENDAR_QUERY_URL,
        headers=headers,
        params={"date": date},
        timeout=10,
    )
    
  2. If JisuAPI requires the appkey query parameter and offers no safer authentication mechanism:

    • Request that the provider support header-based credentials.
    • Disable or redact query-string logging in HTTP diagnostics, proxies, gateways, and monitoring tools.
    • Apply explicit redaction for parameter names such as appkey, api_key, token, and authorization.
    • Never include prepared request URLs or resp.request.url in errors or logs.
    • Restrict the key to only the required calendar APIs, source IP addresses, and minimum necessary quota where the provider supports such controls.
    • Rotate the existing key if full request URLs may already have been logged.
    • Use separate credentials for development, testing, and production to limit exposure scope.
  3. Preserve loading the key from the environment rather than embedding it in source code, and document that process listings, debug logs, and command-line arguments must not contain the key.

Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (6)

Tp2

High
Category
MCP Tool Poisoning
Confidence
85% confidence
Finding

Mixing characters from multiple Unicode scripts in a single identifier is a common technique to create visually ambiguous tool names.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
88% confidence
Finding

The skill declares access to an environment variable API key and relies on outbound network access to a third-party service, but it does not declare an explicit tool scope or permissions boundary. That can cause the agent platform to grant broader execution than users or reviewers expect, increasing the risk of unintended secret use or external data transmission.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The trigger description uses broad language like 'or similar calendar questions,' which can cause over-triggering outside a narrowly defined calendar scope. Overbroad invocation can route unrelated user queries to this skill, leading to unnecessary external API calls and unintended disclosure of user-provided content to a third party.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The documentation states that the skill uses a third-party API and an API key, but it does not disclose that user query data, including dates or related text, will be sent to an external service. This weakens informed consent and can expose user inputs to third-party processing, retention, or logging without clear notice.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% 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 · calendar.py (reported line 14)May include surrounding context.

python
import requests


CALENDAR_QUERY_URL = "https://api.jisuapi.com/calendar/query"
CALENDAR_HOLIDAY_URL = "https://api.jisuapi.com/calendar/holiday"

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% 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 · calendar.py (reported line 15)May include surrounding context.

python
import requests


CALENDAR_QUERY_URL = "https://api.jisuapi.com/calendar/query"
CALENDAR_HOLIDAY_URL = "https://api.jisuapi.com/calendar/holiday"

Static analysis

No suspicious patterns detected.