Back to skill

Security audit

日历同步工具基础版

Security checks for vulnerabilities and agentic risk

Overview

This calendar skill is mostly a generic calendar-sync guide, but it has unclear privacy/data-flow claims, an unrelated trigger scope, and unsafe credential-check guidance.

Install only if you are comfortable reviewing each calendar action before execution. Treat external sync as sharing calendar data with third-party providers, avoid using the broad environment-variable check, and do not let the agent run automatic sync/export/callback operations without explicit confirmation.

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

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
SKILL.md:183
Finding

Broad Environment Credential Enumeration May Expose Secrets

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 183–191
Vulnerability Type: Environment credential reconnaissance and disclosure
Risk Level: Medium

Vulnerable Code

bash
# Verify whether environment variables are configured
echo "Configuration check:"
env | grep -E "API|KEY|TOKEN|SECRET" | sed "s/=.*/=***/"  # Linux/macOS
# Or PowerShell
# Get-ChildItem Env: | Where-Object {$_.Name -match "API|KEY|TOKEN"} | Format-Table

Technical Analysis

The Skill instructs an AI agent with exec access to enumerate environment variables whose names contain broad terms such as API, KEY, TOKEN, or SECRET. This operation is not limited to the credentials required for calendar synchronization and therefore violates least-privilege principles.

The Unix pipeline masks values before displaying them, but still reveals the names and existence of unrelated sensitive variables. The PowerShell command is more severe because Get-ChildItem Env: returns environment-variable names and values, and Format-Table does not redact those values. If the command is uncommented and executed as directed, credentials may be included in terminal output, the agent context, conversation history, execution logs, or platform telemetry.

The issue is classified as unauthorized access because the Skill requests visibility into credentials outside its documented calendar-related needs. No evidence in the audited file shows direct exfiltration or subsequent misuse of the discovered credentials.

Attack Path

  1. A user loads the Skill in an AI agent that has the declared exec capability.
  2. The user or agent follows the documented environment-validation procedure.
  3. On Linux or macOS, the command discovers the names and existence of all variables matching broad secret-related keywords.
  4. On Windows PowerShell, the suggested command enumerates both matching variable names and their values.
  5. The command output enters the agent's context and may be reta ...[truncated 1018 chars]
Remediation
View remediation

Remediation Suggestions

  1. Remove broad enumeration commands based on generic patterns such as API, KEY, TOKEN, and SECRET.
  2. Document the exact provider-specific environment variables required by the Skill.
  3. Check only whether each required variable is present, without printing its value. For example:
bash
if [ -n "${CALENDAR_API_KEY:-}" ]; then
  echo "CALENDAR_API_KEY is configured"
else
  echo "CALENDAR_API_KEY is not configured"
fi
powershell
if ($null -ne $env:CALENDAR_API_KEY -and $env:CALENDAR_API_KEY.Length -gt 0) {
    Write-Output "CALENDAR_API_KEY is configured"
} else {
    Write-Output "CALENDAR_API_KEY is not configured"
}
  1. Avoid returning secret-bearing command output to the AI model, chat transcript, or logs.
  2. Require explicit user confirmation before accessing any credential-related environment variable.
  3. Apply output redaction at the agent or execution-wrapper level as defense in depth.
  4. Use narrowly scoped calendar-provider credentials and rotate any credentials that may already have been exposed through this validation procedure.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • 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
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (5)

Missing User Warnings

High
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill promotes cross-platform synchronization with Google, Apple, and Outlook but does not provide a clear warning that user event details, reminders, attendees, and schedule metadata may be transmitted to third-party services. Because calendar contents are often highly sensitive, this omission raises the privacy risk and can lead to uninformed disclosure of personal or business information.

Content

No source excerpt is available for this finding.

Vague Triggers

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The trigger condition says to use the skill for data analysis, report generation, statistical insight, and visualization, which is unrelated to the stated calendar-management purpose. Overbroad or mismatched triggers can cause an agent to invoke this skill in inappropriate contexts, potentially exposing unrelated user data or causing unintended command execution through its available exec capability.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The natural-language invocation guidance is very broad and tells the agent to automatically execute operations based on user requests without clear scope boundaries. In an agent environment with read/exec/glob/grep tools, vague activation criteria increase the chance of unintended actions, especially when user prompts are ambiguous or adversarial.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The skill claims FREE-version data is stored locally, but the same section states that some functionality requires network access and external APIs for multi-platform calendar sync. This inconsistency can mislead users into sharing sensitive schedule data with third-party providers without a clear understanding of where their information is transmitted or stored.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The document contains contradictory statements about whether user data remains local or is transmitted externally. For a calendar tool handling potentially sensitive personal and business schedules, inaccurate storage/upload claims undermine informed consent and may cause users to expose private event data unexpectedly.

Content

No source excerpt is available for this finding.