Back to skill

Security audit

TravelSmart

Security checks for vulnerabilities and agentic risk

Overview

The travel assistant is mostly coherent, but it exposes an unauthenticated Feishu message relay and broad web-service access that need review before installation.

Review before installing. Run it only on a trusted local interface unless you add authentication. Remove or protect /notify with a signed secret or other authorization, require an explicit FEISHU_CHAT_ID, restrict CORS, and avoid rendering untrusted map/API fields with innerHTML. Also consider adding a clear notice that addresses, coordinates, destinations, and optional LLM prompts are sent to third-party services.

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)

T05 · Unauthorized Access and Privilege Escalation

Error
Location
server.py:30
Finding

Unauthenticated Feishu Message Relay Exposed on All Network Interfaces

Content
View full analysis
str: global _feishu_token, _feishu_token_time import time if _feishu_token and (time.time() - _feishu_token_time) < FEISHU_TOKEN_TTL: return _feishu_token url = 'https://open.feishu.cn/open-apis/auth/v3/tenant_access_token/internal' payload = json.dumps({ 'app_id': FEISHU_APP_ID, 'app_secret': FEISHU_APP_SECRET }).encode() req = urllib.request.Request( url, data=payload, headers={'Content-Type': 'application/json'} ) try: with urllib.request.urlopen(req, timeout=10) as resp: data = json.loads(resp.read()) _feishu_token = data.get('tenant_access_token', '') _feishu_token_time = time.time() return _feishu_token except Exception as e: print(f'[Feishu] token retrieval failed: {e}') return '' def _send_feishu_message(token: str, text: str) -> bool: if not token: return False url = ( 'https://open.feishu.cn/open-apis/im/v1/messages' '?receive_id_type=chat_id' ) payload = { 'receive_id': FEISHU_CHAT_ID, 'msg_type': 'text', 'content': json.dumps({'text': text}) } data = json.dumps(payload).encode('utf-8') req = urllib.request.Request(url, data=data, headers={ 'Content-Type': 'application/json', 'Authorization': f'Bearer {token}' }) try: with urllib.request.ur ...[truncated 3153 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
demo.html:608
Finding

DOM-Based Cross-Site Scripting Through Unescaped API Response Fields

Content
View full analysis
{ const medal = ['🥇','🥈','🥉'][i]; const dining = (e.dining_pois || []).map(p => p.name).slice(0, 3); return `
${medal} ${e.name} ${e.score} points
Distance ${(e.distance/1000).toFixed(1)}km Detour ${(e.detour/1000).toFixed(1)}km Rating ${e.rating.toFixed(1)} ${e.address || 'Address unavailable'}
${dining.length ? `
${ dining.map(n => `${n}`).join('') }
` : ''}
`; }).join(''); } function renderHotel(items) { return items.map((h, i) => { const medal = ['🥇','🥈','🥉'][i]; return `
${medal} ${h.name} ${h.score} points
${h.price} per night ${h.address || 'Address unavailable'}
`; }).join(''); } function renderTaxi(items) { return items.map((p, i) => { const medal = ['🥇','🥈','🥉'][i]; return `
${medal} ${p.name} ${p.score} points
${p.address || 'Address unavailable'} ...[truncated 3485 chars]
Remediation
View remediation
${msg}`; ``` - With a created `div` whose `textContent` is set to `msg`. 5. **Add a restrictive Content Security Policy** - Disallow inline scripts and inline event handlers. - Restrict scripts, connections, fonts, and styles to explicitly required origins. - Use nonces or hashes for necessary first-party scripts. 6. **Add regression tests** - Test fields containing `<`, `>`, quotes, event handlers, SVG payloads, and malformed markup. - Verify that payloads are displayed as literal text and never produce executable DOM nodes. ]]>
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • 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
  • Taint TrackingDirect Taint Flow, Variable-Mediated Taint Flow, Credential Exfiltration Chain
Findings (47)

Tainted flow: 'req' from os.getenv (line 144, credential/environment) → urllib.request.urlopen (network output)

Critical
Category
Data Flow
Confidence
90% confidence
Finding

Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.

Content

Scanner excerpt · server.py (reported line 124)May include surrounding context.

python
payload = json.dumps({'app_id': FEISHU_APP_ID, 'app_secret': FEISHU_APP_SECRET}).encode()
    req = urllib.request.Request(url, data=payload, headers={'Content-Type': 'application/json'})
    try:
        with urllib.request.urlopen(req, timeout=10) as resp:
            data = json.loads(resp.read())
            _feishu_token = data.get('tenant_access_token', '')
            _feishu_token_time = time.time()

Tainted flow: 'req' from os.getenv (line 144, credential/environment) → urllib.request.urlopen (network output)

Critical
Category
Data Flow
Confidence
90% confidence
Finding

Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.

Content

Scanner excerpt · server.py (reported line 149)May include surrounding context.

python
payload = json.dumps({'app_id': FEISHU_APP_ID, 'app_secret': FEISHU_APP_SECRET}).encode()
    req = urllib.request.Request(url, data=payload, headers={'Content-Type': 'application/json'})
    try:
        with urllib.request.urlopen(req, timeout=10) as resp:
            data = json.loads(resp.read())
            _feishu_token = data.get('tenant_access_token', '')
            _feishu_token_time = time.time()

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · README.md (reported line 34)May include surrounding context.

2. 配置高德 Key

bash
cp .env.example .env
# 编辑 .env,填入 AMAP_KEY

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The documented purpose is travel decision support, but the code reportedly also sends outbound Feishu notifications through a /notify workflow and uses a default hard-coded recipient. Undeclared messaging behavior is dangerous because it enables silent data exfiltration, unauthorized notifications, or misuse of external communication channels outside user expectations.

Content

No source excerpt is available for this finding.

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

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

bash
cd skills/travel-smart
pip install -r requirements.txt
cp .env.example .env  # 填入 AMAP_KEY
python src/main.py --scene highway --highway G4 --lng 116.397 --lat 39.909 --destination 北京

Hidden Instructions

High
Category
Prompt Injection
Confidence
70% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · demo.html (reported line 356)May include surrounding context.

html
<body>
<div class="app">

  <!-- Header -->
  <header>
    <div class="logo">
      <div class="logo-icon">🚗</div>

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The skill title and documentation are presented in Chinese from the outset, and the example invocation also uses a Chinese destination value. There is no indication that other languages are supported or that Chinese-only usage is a deliberate, justified regional constraint, which creates a natural-language locale policy concern.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
89% confidence
Finding

The skill declares no explicit tool scope or permissions even though it requires environment variables and performs network access. This creates a transparency and governance gap: operators cannot easily see that the skill can read secrets and call external services, which increases the risk of over-privileged execution or unintended data egress.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The manifest description and primary README content are written entirely in Chinese, including the core skill name/description and usage framing, with no indication that other languages are supported or that Chinese is required for a region-specific compliance reason. This creates a natural-language locale constraint without user opt-in, which matches the language/locale policy violation category.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The document is explicitly marked with lang="zh-CN", and the visible interface text is entirely Chinese, which imposes a specific language/locale on all users. Under the policy, this is a violation unless the skill offers language choice or clearly documents and justifies that it is region-specific.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The page sends precise address and geolocation data to backend endpoints for geocoding and recommendation features, but the UI shown here provides no visible privacy notice, consent prompt, or disclosure about how that sensitive location data will be used or retained. In a travel-assistant context, users may provide home, hotel, and destination addresses, so undisclosed collection increases privacy risk and may violate user expectations or policy requirements.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The PRD explicitly relies on precise user location for travel recommendations but provides no notice about sensitivity, retention, or consent. In this skill context, exact travel coordinates can reveal real-time whereabouts and routines, making privacy harm more concrete than generic analytics collection.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The document specifies sending user travel/location queries to third-party map APIs without warning users that their data will be shared externally. In a travel assistant, route, destination, and current-position data can expose sensitive movement patterns, so undisclosed third-party transfer creates meaningful privacy and compliance risk.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The manifest description says the skill supports three scenarios: highway exit recommendation, lodging en route, and taxi pickup point recommendation. However, the PRD's roadmap marks lodging and taxi-point recommendations as V2 extensions and lists only the core geocoding/exit/restaurant/route pieces as implemented in V1, creating a direct scope mismatch between claimed and documented behavior.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

This markdown file describes endpoints that accept exact longitude/latitude and destination values, which are sensitive location data. The documentation does not include any warning or disclosure about handling, transmitting, or protecting this user data, despite SQP-2 requiring warnings in markdown for behaviors affecting privacy.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The entire markdown document is written in Chinese and provides no indication that users may choose another language or that the locale restriction is required for a region-specific purpose. Under the policy for natural-language violations, forcing a specific language without user opt-in should be flagged.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The server exposes a generic /notify endpoint unrelated to the three stated travel-assistant scenarios, and it accepts arbitrary POSTed text for outbound delivery. Without authentication or scope restrictions, this creates an unintended message relay capability that can be abused by anyone who can reach the service.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The code implements an arbitrary callback-to-Feishu bridge: user-supplied text is accepted and forwarded to a fixed Feishu chat. In the context of a travel assistant, this is out of scope and increases the risk of spam, phishing, data exfiltration, or covert notification abuse if the endpoint is exposed.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The /notify endpoint forwards user-provided text to an external Feishu service without notice, consent controls, or restrictions. That matters because the data leaves the local service boundary and can include sensitive content supplied by arbitrary callers.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

This code file contains user-facing natural-language strings entirely in Chinese, including the module description and all formatted responses. The skill does not offer a language/locale option or document that it is intentionally limited to Chinese users, which can violate the policy against forcing a specific language without user opt-in.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The module docstrings and SYSTEM_PROMPT are entirely in Chinese and instruct the model to operate in that language context, with no indication that other languages are supported or that Chinese is a justified locale restriction. This can violate language/locale policy when users are not given an opt-in choice.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The code sends raw user input directly to a third-party LLM endpoint, but this file shows no consent flow, redaction, or disclosure mechanism. In a travel-assistant context, user messages can easily contain sensitive location, itinerary, or lodging information, so undisclosed external transmission creates a real privacy and data-governance risk even if it is functionally intended.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The client sends addresses, coordinates, route origins/destinations, and search terms to the Amap API via requests.get. Although network access is the skill's purpose, this file contains no explicit user disclosure or warning that potentially sensitive location data will be transmitted to a third-party service.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

User-facing descriptions, help text, prompts, and error messages are all hard-coded in Chinese, which imposes a specific language/locale on all users. There is no opt-in, language selection, or documented justification that this skill is intentionally limited to Chinese-speaking users.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The code logs precise user longitude and latitude via logger.info, which can expose sensitive location data in application logs. In this travel-assistant context, location is highly sensitive because it can reveal real-time movement patterns, and logs are often broadly accessible, retained, or exported to third-party monitoring systems.

Content

No source excerpt is available for this finding.