Back to skill

Security audit

kuaishou-lifeservice-business-assistant

Security checks for vulnerabilities and agentic risk

Overview

This appears to be a real Kuaishou merchant API helper, but it asks for and stores merchant secrets and tokens in unsafe plaintext ways that need review before installation.

Install only if you are comfortable granting this skill access to Kuaishou merchant credentials and merchant business data. Do not paste production app_secret values into chat or shell commands; use a protected secret store or disposable test credentials, restrict the workspace, exclude .kuaishou-localife-token from source control and backups, and rotate any credential that was already pasted or logged.

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 (3)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/api_key_manager.py:118
Finding

Merchant credentials and access tokens are stored in plaintext without restrictive file permissions

Content
View full analysis
None: """Save all API keys to file.""" self._ensure_dir() with open(self.api_keys_file, "w", encoding="utf-8") as f: for key in keys: f.write(key.to_line() + "\n") ``` ```python # Save to current context self._ensure_dir() with open(self.current_context_file, "w", encoding="utf-8") as f: f.write(selected.to_line() + "\n") ``` ```python def save_token_to_file(self, token: str) -> None: token_dir = os.path.dirname(self.access_token_file) if token_dir and not os.path.exists(token_dir): os.makedirs(token_dir, exist_ok=True) with open(self.access_token_file, "w", encoding="utf-8") as f: f.write(token) ``` ### Technical Analysis The Skill stores long-lived merchant credentials in `.kuaishou-localife-token/api_keys.txt` and duplicates the currently selected credential, including `app_secret`, in `current_context.txt`. It also caches the bearer-equivalent access token in a plaintext `access_token.txt` file. The files and containing directories are created without explicit restrictive permissions. Their effective permissions therefore depend on the process umask and any pre-existing file mode. The implementation also does not verify file ownership or correct permissions on existing files. Encryption at rest is not used, and the credential directory is located relative to the current working directory. This increases the possibility that it will be included in backups, workspace snapshots, archives, or source-control commits. The storage supports the declared authentication workflow, but retaining multiple plaintext application secrets and dupli ...[truncated 1429 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/api_key_manager.py:335
Finding

Reusable secrets are exposed through command-line arguments and standard output

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/call_api.py:339
Finding

Access token is unnecessarily duplicated in a URL query parameter

Content
View full analysis
Dict: params = { "page": page, "page_size": page_size, "commission_status": commission_status, "item_id": item_id, "scene": "itemBaseCommissionPage", "access-token": self.access_token } return self._get( "/goodlife/rest/merchant/apicenter/artisan/item/commission/page/query", params ) ``` The client already places the same token in the request headers: ```python self.headers = { "Content-Type": "application/json", "access-token": access_token } ``` ### Technical Analysis The item-commission request includes the access token both in an HTTP header and in the query string. Query parameters become part of the request URL and are more likely than headers to be retained by reverse proxies, access logs, tracing systems, exception reports, browser-style diagnostics, and network monitoring products. HTTPS protects the URL while it is in transit, but it does not prevent the client, destination server, or trusted intermediaries from logging the complete URL. Because header authentication is already configured globally, including the token in the query string is unnecessary and violates least-exposure principles. The destination remains a declared Kuaishou API domain, so the behavior is not evidence of unrelated third-party exfiltration. The risk arises from avoidable credential propagation into logging surfaces. ### Attack Path 1. An authenticated user invokes the item-commission query. 2. The client constructs a URL containing `access-token=`. 3. A proxy, gateway, tracing agent, HTTP diagnostic tool, or server acc ...[truncated 684 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • 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
Findings (69)

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The skill is described as a merchant operations helper, but the implementation context indicates it reads locally stored app_key/merchant_id/app_secret values, fetches access tokens, and persists them to disk. Secret ingestion plus token caching materially changes the risk profile, because compromise of local files or logs can expose long-lived credentials and enable unauthorized API access.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The skill is described as a merchant operations helper, but the implementation context indicates it reads locally stored app_key/merchant_id/app_secret values, fetches access tokens, and persists them to disk. Secret ingestion plus token caching materially changes the risk profile, because compromise of local files or logs can expose long-lived credentials and enable unauthorized API access.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The skill is described as a merchant operations helper, but the implementation context indicates it reads locally stored app_key/merchant_id/app_secret values, fetches access tokens, and persists them to disk. Secret ingestion plus token caching materially changes the risk profile, because compromise of local files or logs can expose long-lived credentials and enable unauthorized API access.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The skill is described as a merchant operations helper, but the implementation context indicates it reads locally stored app_key/merchant_id/app_secret values, fetches access tokens, and persists them to disk. Secret ingestion plus token caching materially changes the risk profile, because compromise of local files or logs can expose long-lived credentials and enable unauthorized API access.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The skill explicitly asks users to provide full credentials in the form app_key#merchant_id#app_secret and even suggests sending them directly for testing, without any warning about sensitivity, retention, or safer alternatives. This is a classic secret-handling flaw because chat channels, logs, transcripts, and support workflows may retain the credentials, enabling account compromise and unauthorized API use.

Content

No source excerpt is available for this finding.

Ssd 3

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The instruction to paste full API credentials directly into the chat interface is an explicit sensitive-secret disclosure pattern. Because the skill operates in a merchant/business context with real production credentials, compromise of those values can permit unauthorized access to merchant data and downstream token issuance.

Content

No source excerpt is available for this finding.

Credential Access

High
Category
Privilege Escalation
Confidence
80% confidence
Finding

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

Content

Scanner excerpt · scripts/get_access_token.py (reported line 12)May include surrounding context.

python
- Support loading credentials from current context file

Default storage dir:
  ./.kuaishou-localife-token/{app_key}/{merchant_id}/access_token.txt

Notes:
- TTL defaults to 1.9 days. You can override by --access_token_ttl.

Credential Access

High
Category
Privilege Escalation
Confidence
80% confidence
Finding

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

Content

Scanner excerpt · scripts/get_access_token.py (reported line 193)May include surrounding context.

python
- Support loading credentials from current context file

Default storage dir:
  ./.kuaishou-localife-token/{app_key}/{merchant_id}/access_token.txt

Notes:
- TTL defaults to 1.9 days. You can override by --access_token_ttl.

Credential Access

High
Category
Privilege Escalation
Confidence
88% confidence
Finding

This code establishes a predictable on-disk location for storing bearer tokens under a relative directory, increasing the chance of accidental disclosure through weak permissions, workspace sharing, or repository mishandling. In a merchant operations context, compromise of the token can expose store data and permit unauthorized API actions within the token scope.

Content

Scanner excerpt · scripts/get_access_token.py (reported line 87)May include surrounding context.

python
if access_token_file is None:
            token_dir = os.path.join(self.DEFAULT_TOKEN_BASE_DIR, str(app_key), str(merchant_id))
            access_token_file = os.path.join(token_dir, "access_token.txt")

        self.access_token_file = access_token_file

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

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

Content

Scanner excerpt · scripts/get_access_token.py (reported line 134)May include surrounding context.

python
message = data.get("message", "API returned error")
                return {"error": True, "message": f"API error (status={status}): {message}", "response": data}

            # Access token is now in data.access_token
            data_obj = data.get("data")
            if not data_obj:
                return {"error": True, "message": "Missing data object in response", "response": data}

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

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

Content

Scanner excerpt · scripts/call_api.py (reported line 578)May include surrounding context.

python
args = parser.parse_args()
    
    # Get access token using AccessTokenManager
    context = load_current_context()
    if not context:
        print("Error: No current context found.", file=sys.stderr)

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

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

Content

Scanner excerpt · scripts/product_api.py (reported line 413)May include surrounding context.

python
args = parser.parse_args()
    
    # Get access token using AccessTokenManager
    context = load_current_context()
    if not context:
        print("Error: No current context found.", file=sys.stderr)

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

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

Content

Scanner excerpt · scripts/query_report.py (reported line 495)May include surrounding context.

python
args = parser.parse_args()
    
    # Get access token using AccessTokenManager
    context = load_current_context()
    if not context:
        print("Error: No current context found.", file=sys.stderr)

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
86% confidence
Finding

The skill declares capabilities that imply file I/O and network access, but does not specify any tool scope or allowed-tools boundaries. In a credential-handling skill, missing explicit permission scoping increases the blast radius if the implementation is invoked in an unexpected context or later expanded, because users and platforms cannot easily constrain what resources it may access.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

Several trigger phrases are broad everyday terms such as '下载', '区域', or '官号', which can cause accidental invocation in unrelated conversations. In a skill that can read/write local state and handle merchant credentials, unintended activation increases the chance of data exposure, confusing actions, or unnecessary secret prompts.

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 · references/api-reference.md (reported line 22)May include surrounding context.

请求示例:

bash
curl --location 'https://lbs-open.kuaishou.com/goodlife/v1/merchant/QueryStaffUserInfo' \
--header 'Content-Type: application/json' \
--header 'access-token: YOUR_ACCESS_TOKEN' \
--data '{

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The API examples include personal data fields such as mobile phone numbers and staff identifiers without any privacy, minimization, or handling guidance. In an agent skill, this raises the chance that implementers will collect, transmit, or log sensitive merchant and employee data without appropriate safeguards.

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 · references/api-reference.md (reported line 46)May include surrounding context.

请求示例:

bash
curl --location --request GET 'https://lbs-open.kuaishou.com/goodlife/v1/workbench/todo_list' \
--header 'Content-Type: application/json' \
--header 'access-token: YOUR_ACCESS_TOKEN' \
--data '{

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 · references/api-reference.md (reported line 88)May include surrounding context.

请求示例:

bash
curl --location 'https://lbs-open.kuaishou.com/goodlife/v1/merchant/subAccounts' \
--header 'Content-Type: application/json' \
--header 'access-token: YOUR_ACCESS_TOKEN' \
--data '{

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 · references/api-reference.md (reported line 132)May include surrounding context.

请求示例:

bash
curl --location 'https://lbs-open.kuaishou.com/goodlife/v1/metric/queryMetric' \
--header 'Content-Type: application/json' \
--header 'access-token: YOUR_ACCESS_TOKEN' \
--data '{

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 · references/api-reference.md (reported line 158)May include surrounding context.

请求示例:

bash
curl --location 'https://lbs-open.kuaishou.com/goodlife/v1/metric/queryMetric' \
--header 'Content-Type: application/json' \
--header 'access-token: YOUR_ACCESS_TOKEN' \
--data '{

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 · references/api-reference.md (reported line 197)May include surrounding context.

请求示例:

bash
curl --location 'https://lbs-open.kuaishou.com/goodlife/v1/metric/queryMetric' \
--header 'Content-Type: application/json' \
--header 'access-token: YOUR_ACCESS_TOKEN' \
--data '{

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 · references/api-reference.md (reported line 240)May include surrounding context.

请求示例:

bash
curl --location 'https://lbs-open.kuaishou.com/goodlife/v1/artisan/QueryAutoCommissionInfo' \
--header 'Content-Type: application/json' \
--header 'access-token: YOUR_ACCESS_TOKEN' \
--data '{}'

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 · references/api-reference.md (reported line 299)May include surrounding context.

请求示例:

bash
curl --location 'https://lbs-open.kuaishou.com/goodlife/v1/merchant/QueryMerchantRealTimeMetric' \
--header 'Content-Type: application/json' \
--header 'access-token: YOUR_ACCESS_TOKEN' \
--data '{

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 · references/api-reference.md (reported line 345)May include surrounding context.

请求示例:

bash
curl --location 'https://lbs-open.kuaishou.com/goodlife/rest/merchant/apicenter/poi/qrCode/list' \
--header 'Content-Type: application/json' \
--header 'access-token: YOUR_ACCESS_TOKEN' \
--data '{