Back to skill

Security audit

gsdata-data-search

Security checks for vulnerabilities and agentic risk

Overview

This appears to be an ES search helper, but its credential handling and inconsistent authentication documentation need review before installation.

Review this skill before installing. Use it only with a trusted local ES API service, avoid storing unnecessary tokens, use a low-scope app_key that can be rotated, and do not run --show-config in shared logs or screen-sharing sessions. The publisher should align the auth documentation with the implementation, avoid plaintext secret display, prefer protected secret storage, and pin dependencies.

Vulnerability Patterns
  • 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
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
Findings (4)

T09 · Insecure Skill Coding Practices

Warning
Location
es_search.py:69
Finding

API Credentials Are Stored and Disclosed in Plaintext

Content
View full analysis
bool: """ Store parameters in the configuration file. """ config_file = get_config_file_path() try: config_data = { 'app_key': app_key } if token: config_data['token'] = token with open(config_file, 'w', encoding='utf-8') as f: json.dump(config_data, f, ensure_ascii=False, indent=2) return True except Exception as e: print(f'Failed to save configuration: {str(e)}', file=sys.stderr) return False ``` ```python def show_config() -> str: """ Display the current configuration file contents. """ config_file = get_config_file_path() try: if os.path.exists(config_file): with open(config_file, 'r', encoding='utf-8') as f: config_data = json.load(f) return json.dumps(config_data, ensure_ascii=False, indent=2) else: return 'Configuration file does not exist' except Exception as e: return f'Failed to read configuration file: {str(e)}' ``` ```python parser.add_argument( '--save-config', nargs='+', metavar=('APP_KEY', 'TOKEN'), help='Save app_key and optional token to the configuration file' ) ``` ### Technical Analysis The Skill accepts credentials as command-line arguments and writes them directly to `config.json` without encryption or explicit restrictive file permissions. The resulting permissions depend on the process umask and may allow access by other local users or processes. Command-line credentials may also be exposed through shell history, process inspection, terminal recording, and automation logs. The `--show-config` operation returns the complete configuratio ...[truncated 1239 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
es_search.py:275
Finding

Credential and Search Query Transmission Over Unauthenticated Plaintext HTTP

Content
View full analysis
= max_retries: raise import time time.sleep(2) ``` ### Technical Analysis The API request transmits the `app_key`, HMAC signature, timestamp, and user-derived search criteria using plaintext HTTP. The hardcoded destination is the loopback interface, so the reviewed implementation does not directly exfiltrate data to an external host. The network request is also necessary for the declared API-search functionality. However, HTTP does not authenticate the receiving service or provide transport confidentiality. A malicious or compromised process that controls the local port can impersonate the expected API and receive credentials and search queries. The signing design further uses `app_key` as both the transmitted application identifier and the HMAC key: ```python message = (app_key + timestamp).encode('utf-8') key = app_key.encode('utf-8') signature = hmac.new(key, message, hashlib.sha256). ...[truncated 1322 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
es_search.py:330
Finding

Untrusted API Fields Are Rendered as Unescaped Markdown

Content
View full analysis
Remediation
View remediation

T08 · Insecure Dependencies

Note
Location
requirements.txt:1
Finding

Third-Party Dependency Is Unpinned

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • 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 (13)

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The module documentation states that token-based authorization is required, but the actual request only sends app-key, sign, and timestamp headers and never uses the stored token. This creates a security design mismatch: operators may believe token authentication is enforced when it is silently omitted, weakening access control or causing integrations to run with incomplete authentication assumptions.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The skill stores API credentials in a local JSON file next to the script and provides a command that prints the stored contents, including token material if present. This increases the risk of credential disclosure through weak filesystem permissions, accidental check-in, terminal history, screen sharing, or other local-user access patterns.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The skill sends user search queries and authentication headers over plain HTTP, with no transport encryption or certificate validation because TLS is not used. Anyone on the network path can intercept or modify both sensitive search content and authentication material, making credential theft and response tampering realistic risks.

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 · es_search.py (reported line 324)May include surrounding context.

python
while retry_count < max_retries:
            try:
                response = requests.post(api_url, json=json.loads(params_json), headers=headers, timeout=60)
                break  # 请求成功,跳出循环
            except requests.exceptions.RequestException as e:
                retry_count += 1

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The display name and all user-facing descriptions are presented only in Chinese, which indicates a fixed language/locale experience. The manifest does not offer language choice, fallback behavior, or a documented reason that the skill is intentionally limited to Chinese-speaking users or a China-specific deployment context.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The manifest says the skill supports '自然语言解析' of a '自然语言搜索请求文本', which implies it may activate on a wide range of ordinary search-like requests without specifying exact trigger phrases or exclusion conditions. In a manifest file, this lack of explicit trigger scope can cause unintended invocation because users and orchestrators are not told where the skill should or should not apply.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The natural-language instructions, headings, and invocation examples all assume Chinese input such as "帮我获取...", but the file does not state that the skill is intentionally limited to Chinese users or provide an opt-in language choice. Under the language/locale policy, forcing a specific language without user choice is a policy concern.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The documentation makes conflicting security claims: it advertises token persistence and dual authentication, while later sections and the changelog say token/Auth support was removed or simplified. This can cause operators to misconfigure authentication, assume stronger protections than actually exist, or mishandle secrets based on outdated guidance.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The usage notes say first-time use requires both app_key and token, but the documented config format and changelog indicate only app_key is used. This inconsistency can lead users to expose or store unnecessary credentials, misunderstand the actual trust model, and fail to detect when token-based protection is absent.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

User-facing descriptions, examples, prompts, errors, and parsing logic are written for Chinese input and Chinese platform/emotion keywords only. There is no opt-in, language selection, or documented justification that this is a region-specific tool, so the file presents a locale constraint that may violate language-choice policy.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
96% confidence
Finding

The top-level documentation declares the API address as http://192.168.11.79:5000/api/es/search. The actual request code posts to http://127.0.0.1:5001/api/es/search instead. This is a direct contradiction in stated behavior versus implemented behavior.

Content

No source excerpt is available for this finding.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
97% confidence
Finding

The dependency manifest specifies requests without a version pin, which makes builds non-reproducible and can cause installation of unexpectedly old or newly introduced vulnerable releases depending on the environment and resolver behavior. In a security-sensitive agent skill, this increases supply-chain risk and makes it impossible to verify whether a safe version is consistently installed.

Content

Scanner excerpt · requirements.txt (reported line 1)May include surrounding context.

text
requests

Unverifiable Dependency: requests has 16 known advisory(ies) (CVE-2014-1830 (Exposure of Sensitive Information to an Unauthorized Actor in Requests); CVE-2024-47081 (Requests vulnerable to .netrc credentials leak via malicious URLs); CVE-2024-35195 (Requests `Session` object does not verify requests after making first request wi) +13 more), but the manifest does not pin a version, so it is unknown whether the installed release is affected

Low
Category
Supply Chain
Confidence
95% confidence
Finding

requests has multiple known advisories, and because no version is pinned, the manifest does not establish whether deployment will use a patched or vulnerable release. This uncertainty is dangerous in an agent context because network libraries often handle authentication, redirects, proxies, and credential sources such as .netrc, so a vulnerable version could expose secrets or weaken transport security.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.