Back to skill

Security audit

Shopify Admin

Security checks for vulnerabilities and agentic risk

Overview

This Shopify admin helper is mostly coherent, but it needs Review because it handles privileged store access and includes unsafe PII workaround advice, broad write scopes, and unguarded product deletion.

Install only after reviewing the Shopify token scopes and runtime environment. Use the narrowest possible token, validate or hardcode the intended myshopify.com hostname, avoid the PII webhook workaround, and do not enable destructive product deletion without an explicit confirmation or separate restricted token.

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)

T09 · Insecure Skill Coding Practices

Error
Location
shopify-admin.sh:7
Finding

Shopify access token can be transmitted to an untrusted host

Content
View full analysis
&2 exit 1 fi API_BASE="https://${SHOPIFY_STORE_DOMAIN}/admin/api/2026-01" AUTH_HEADER="X-Shopify-Access-Token: ${SHOPIFY_ACCESS_TOKEN}" ``` ### Technical Analysis The script checks only that `SHOPIFY_STORE_DOMAIN` is nonempty. It does not verify that the value is a legitimate Shopify hostname or the specific store authorized to receive the access token. Every supported operation constructs its URL from `API_BASE` and sends `AUTH_HEADER` to that destination. Consequently, anyone who can influence the process or gateway environment can direct the request to an attacker-controlled HTTPS host and receive the Shopify Admin API token in the `X-Shopify-Access-Token` header. Allowing the Shopify store to be configured is necessary for the declared functionality, but allowing an unrestricted credential destination exceeds that requirement. ### Attack Path 1. An attacker gains the ability to influence the agent or gateway environment, deployment configuration, or command execution context. 2. The attacker sets `SHOPIFY_STORE_DOMAIN` to an HTTPS hostname under their control. 3. A user or agent invokes any command, such as `shop`, `orders`, or `products`. 4. The script constructs an API URL using the malicious hostname. 5. `curl` connects to that host and includes the victim's Shopify token in the request header. 6. The attacker captures the token and uses it directly against the legitimate Shopify Admin API. ### Impact Asses ...[truncated 370 chars]
Remediation
View remediation
&2 exit 1 ;; *.myshopify.com) ;; *) echo "Error: Store domain must be an approved myshopify.com hostname." >&2 exit 1 ;; esac ``` An exact hostname allowlist is safer than a suffix check whenever the deployment targets only one store. ]]>

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
SKILL.md:214
Finding

Documented token scopes exceed the privileges required by the bundled commands

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (13)

Tp4

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

The documented behavior extends beyond the declared purpose by including destructive deletion and access to analytics, marketing, reporting, and customer-event data. This mismatch undermines informed consent and security review, increasing the chance that operators grant the skill access without realizing it can modify resources or access additional sensitive business and customer data.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

Recommending capture of PII through webhooks before masking effectively instructs users on bypassing a platform privacy control. That increases the risk of unauthorized collection, regulatory violations, and excessive retention of sensitive customer information.

Content

No source excerpt is available for this finding.

Ssd 3

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The instruction to capture customer PII via webhooks to avoid normal API masking is a direct bypass pattern for privacy restrictions. Even if intended as operational advice, it encourages collection of protected data outside normal access controls and expands exfiltration and compliance exposure.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The delete-product command performs an immediate authenticated DELETE request with no confirmation, dry-run mode, or secondary approval. In an agent or CLI workflow, this significantly increases the chance of accidental destructive actions or prompt/parameter misuse leading to irreversible storefront and inventory impact.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
95% confidence
Finding

The skill exposes shell-based network capabilities via curl but does not declare any explicit tool scope or allowed-tools policy. This weakens containment and reviewability, making it easier for a caller or future edit to perform broader command execution or data exfiltration than users expect.

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

md
- SHOPIFY_STORE_DOMAIN
        - SHOPIFY_ACCESS_TOKEN
      bins:
        - curl
        - jq
---

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The skill advertises access to customer and behavioral data but does not include privacy, retention, or compliance cautions. In practice this can normalize collection and transmission of sensitive personal data without reminding operators to apply least privilege and legal safeguards.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

Documenting a DELETE operation without any warning, confirmation guidance, or safety guard raises the risk of accidental destructive actions against production inventory. In an agent context, omission of such safeguards can lead to irreversible product loss from simple misuse or prompt misunderstanding.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
86% confidence
Finding

This shell script performs network calls to the Shopify Admin API that retrieve orders, customers, customer events, and attribution data, which can contain personal or commercially sensitive information. While the script documents required environment variables, it does not include any user-facing warning or disclosure that these commands send authenticated requests and expose returned sensitive data in terminal output.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The script exposes a destructive delete-product capability that is not reflected in the described skill behavior, which creates a dangerous mismatch between what a user/operator may expect and what the tool can actually do. In an agent setting, hidden destructive actions increase the risk of accidental or unauthorized inventory modification because users may invoke or permit the skill without understanding it can delete store data.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Low
Category
Not specified by scanner
Confidence
82% confidence
Finding

The manifest description in L004 presents the skill primarily as a Shopify Admin CLI for core commerce administration. However, the documented operations also include marketing events, attribution analytics, reports, and customer behavior tracking (L104-L189), which extend beyond the specifically named areas and add monitoring/marketing functionality not clearly reflected in the summary description.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
77% confidence
Finding

Lines L024-L031 first state the script uses only the process environment and does not read any dotenv file, then immediately describe a common setup where ~/.openclaw/.env is loaded so the script inherits secrets. This is not a code-level contradiction in execution, but it is an intent/documentation inconsistency that could confuse readers about whether file-based secret loading is part of the operational model.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
78% confidence
Finding

The script reads SHOPIFY_ACCESS_TOKEN from the environment and uses it to authorize Admin API requests. Although the variable requirement is documented, there is no explicit warning that the script consumes privileged credentials to perform administrative actions against the store.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.