Back to skill

Security audit

Shopdora — Shopee Product Selection & Keyword Research Tool

Security checks for vulnerabilities and agentic risk

Overview

The skill is a coherent Shopdora API helper, but it asks users to give the agent long-lived API secrets and stores credentials and tokens locally without clear safeguards.

Install only if you are comfortable giving this skill access to a paid Shopdora account. Prefer configuring credentials outside the chat, restrict ~/.shopdora permissions to owner-only access, avoid exposing secrets in command output or logs, and rotate the Shopdora clientSecret if it is pasted into a conversation or stored insecurely.

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
SKILL.md:44
Finding

Insecure Collection, Storage, and Transmission Handling of API Credentials and Bearer Tokens

Content
View full analysis
/dev/null ``` ### First-Time Setup — Guide the User If the config file doesn't exist, reply to the user: > This is a paid service. Please visit https://www.shopdora.com and contact official customer service to get your token. Once you have your `clientId` and `clientSecret`, share them with me and I'll set it up. After receiving the credentials, create the config file: ```bash mkdir -p ~/.shopdora ``` Then write the JSON config with the user-provided `clientId` and `clientSecret`. ### Config File Format ```json { "clientId": "std_xxxxxxxx", "clientSecret": "your_secret_here" } ``` ``` The access token is also persisted as plaintext and credentials are inserted into a command argument: ```markdown The token is stored in `~/.shopdora/token.json`: ```json { "accessToken": "a1b2c3d4e5f6...", "tokenType": "Bearer", "expiresIn": 2678400, "obtainedAt": 1753718400 } ``` **API call:** ```bash curl -s -X POST 'https://openapi.shopdora.cn/openapi/standard/token' \ -H 'Content-Type: application/json' \ -d '{"clientId":"","clientSecret":""}' ``` ``` ### Technical Analysis The Skill instructs users to disclose a long-lived `clientSecret` directly to the agent and then stores that secret in `~/.shopdora/config.json`. It similarly stores the reusable bearer token in `~/.shopdora/token.json`. No requirement is given to create `~/.shopdora` with mode `0700` or the secret-bearing files with mode `0600`. Consequently, actual accessibility depends on the host's umask and the unspecified method used to write the files. On a shared or improperly configured sy ...[truncated 2644 chars]
Remediation
View remediation
Vulnerability Patterns
  • 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
  • Rogue AgentSelf-Modification, Session Persistence
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
Findings (14)

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 · SKILL.md (reported line 179)May include surrounding context.

md
---

### Workflow 1: Get Access Token

A valid access token is required before any paid API calls.

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 · SKILL.md (reported line 181)May include surrounding context.

md
### Workflow 1: Get Access Token

A valid access token is required before any paid API calls.

**Token persistence mechanism**:

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

md
## API Details

### POST /standard/token — Get Access Token

**No token required.**

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

md
| Field | Type | Description |
|------|------|------|
| accessToken | string | Access token |
| tokenType | string | Always "Bearer" |
| expiresIn | integer | Validity in seconds, ~31 days by default |

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The trigger conditions are broad enough to activate on generic ecommerce analysis requests, including common phrases and country/site references. Overbroad invocation can route unrelated user requests into a credentialed external-data workflow, increasing the chance of unnecessary secret handling, external calls, or paid actions.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The setup flow asks the user to send client credentials directly to the agent, but does not warn about the sensitivity of those secrets or safer input methods. This encourages disclosure of reusable API credentials in conversation and local storage without clear safeguards.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill explicitly instructs the agent to solicit clientId and clientSecret from the user and then persist them locally. Collecting long-lived credentials through the agent expands the attack surface and creates a high-value secret handling path that may be logged, exposed, or misused.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
93% confidence
Finding

The skill directs creation of a persistent configuration directory for credentials under the user's home directory without specifying file permissions, encryption, or storage safeguards. Persisting secrets in predictable local paths increases the risk of accidental exposure to other processes, users, backups, or logs.

Content

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

This is a paid service. Please visit https://www.shopdora.com and contact official customer service to get your token. Once you have your clientId and clientSecret, share them with me and I'll set it up.

After receiving the credentials, create the config file:

bash
mkdir -p ~/.shopdora

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill states a strict 'no auto-retry' policy for paid endpoints, but later instructs automatic retries for rate-limit and system-busy errors. This contradiction can cause unintended extra API calls, additional quota consumption, and behavior the user did not explicitly approve, especially in a paid service context.

Content

No source excerpt is available for this finding.

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
80% confidence
Finding

Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Content

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

md
- ❌ Automatically changing keywords and retrying
- ❌ Automatically paginating to fetch more data
- ❌ Automatically modifying site, price range, time range, or any parameter and retrying
- ❌ Automatically changing sort order and retrying

Correct approach:

Session Persistence

Medium
Category
Rogue Agent
Confidence
91% confidence
Finding

Persisting access tokens and acquisition metadata in ~/.shopdora/token.json creates long-lived session material on disk in a predictable location. If the file is readable by other local users, tools, or compromised processes, an attacker could reuse the token to access the user's account and consume quota or retrieve data.

Content

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

md
1. First, attempt to read `~/.shopdora/token.json`
2. If the file exists, check if `obtainedAt + expiresIn > current timestamp`; use directly if valid
3. If the file doesn't exist or has expired, read credentials from `~/.shopdora/config.json` and call the token endpoint
4. Write the new token and acquisition time to `~/.shopdora/token.json`
5. All subsequent API requests read accessToken from `token.json`

**API call:**

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 · SKILL.md (reported line 207)May include surrounding context.

API call:

bash
curl -s -X POST 'https://openapi.shopdora.cn/openapi/standard/token' \
  -H 'Content-Type: application/json' \
  -d '{"clientId":"<read from config>","clientSecret":"<read from config>"}'

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
90% confidence
Finding

Automatically deleting token.json, re-acquiring a token, and retrying the original request gives the agent autonomous control over credential refresh and repeated execution. In a paid API workflow, this can lead to unapproved retries, repeated requests, and additional exposure of secrets during refresh operations.

Content

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

md
**Token renewal rules:**

- Token is valid for ~31 days; re-acquire before expiration
- When any API returns `9990`, automatically delete `token.json`, re-acquire the token, and retry the original request
- Check the `tokenExpiresIn` field from `/standard/queryBalance` for the precise expiration time

---

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
90% confidence
Finding

This is a markdown file, so SQP-2 applies to descriptions that omit warnings about behaviors affecting privacy or user data. The section describes /standard/comment/get as "Review Scraping" and enumerates returned review fields such as comments, usernames, images, videos, and region, but provides no caution about privacy, data handling, or responsible use.

Content

No source excerpt is available for this finding.