T09 · Insecure Skill Coding Practices
- Location
scripts/shopify-operations-brief.mjs:102- Finding
Symbolic-Link Bypass Allows Report Writes Outside the Working Directory
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This is a coherent read-only Shopify reporting skill, but its local CLI and file-output handling create review-worthy command-execution and file-write risks in some environments.
Review this skill before installing, especially on Windows or shared workspaces. Use a merchant-owned read-only Shopify connection, keep skill-hub.env in a private directory, avoid attacker-controlled working directories, avoid custom Shopify CLI paths unless trusted, and treat generated reports as private merchant data.
scripts/shopify-operations-brief.mjs:102Symbolic-Link Bypass Allows Report Writes Outside the Working Directory
scripts/lib/auth.mjs:232Windows Shell Execution Exposes Configurable Shopify CLI Arguments to Command Injection
scripts/shopify-operations-brief.mjs:118Credential Template Is Created Without Restrictive Permissions or Atomic No-Follow Semantics
Skill modifies its own code, configuration, or behavior at runtime. Self-modification enables an agent to escalate privileges, disable safety constraints, or install persistent backdoors.
const resolvedVersion = response.headers['x-shopify-api-version'];
if (resolvedVersion && resolvedVersion !== apiVersion) {
reject(new Error(`API_VERSION_MISMATCH: Requested ${apiVersion}, Shopify used ${resolvedVersion}. Update SKILL_HUB_SHOPIFY_API_VERSION before retrying.`));
return;
}
if (response.statusCode >= 400) {
Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.
</head>
<body>
<div class="container">
<!-- Header -->
<header class="header">
<div>
<div class="store-badge">
The file specifies visible labels using fixed Chinese/English text and priority labels, but does not state that the user can choose a language or that the bilingual requirement is limited to a justified regional context. This creates a natural-language locale policy concern because the output language format is imposed rather than offered as an opt-in choice.
The function defaults lang to zh-CN, which causes generated summaries and recommendations to be in Chinese unless the caller explicitly overrides it. This imposes a specific locale by default rather than offering a neutral default or explicit user choice, which matches the language/locale policy violation criteria.
The manifest describes a read-only store performance overview skill, but this file implements subprocess execution via execFile and invokes shopify store auth and shopify store execute. Spawning an external CLI is a broader capability than simple read-only analytics access and is not declared in the skill description as part of its scope.
The code pulls abandoned checkout records, which go beyond a simple operational performance summary and enter conversion/marketing analysis territory. While the fields shown are limited, collecting this dataset without a clearly justified need increases access to customer-behavior data and broadens the skill's effective capability beyond its declared purpose. The skill context makes this somewhat less dangerous than a write-capable marketing tool, but the scope expansion is still meaningful.
The skill is described as a period-based read-only performance brief, but it unconditionally fetches all active products and inventory for the entire store. That creates unnecessary overcollection beyond the stated purpose and expands exposure of commercially sensitive inventory data if the output, logs, or downstream processing are mishandled. In this context, the read-only nature reduces severity, but the mismatch between declared scope and actual data access is still a real data-minimization issue.
The function signature sets lang = 'zh-CN', and the HTML language is then derived from that value, causing the skill to default to a specific locale when no user choice is provided. This is a natural-language policy concern because the file forces a language/locale preference rather than offering neutral fallback or explicit user opt-in.
The CLI defaults lang to zh-CN, which means generated summaries and report output will use a specific locale unless the user explicitly overrides it. This imposes a language choice by default rather than offering a neutral or opt-in selection, matching the locale-policy violation criteria.
The example command explicitly passes --lang zh-CN, which indicates a specific language/locale setting. In this markdown file, there is no nearby statement that language choice is optional or that Chinese output is required for a region-specific use case, so this can be read as a default or recommended forced locale.
If no local env file exists, loadEnvFile returns a copy of all process.env values. For a skill intended only to generate a read-only Shopify operations brief, broad access to the host process environment is unnecessary and expands its capability beyond the stated purpose.
The locale helper falls back to 'zh-CN' for any language value that is missing or does not start with 'en'. This imposes a specific language choice by default rather than offering a neutral selection or explicit user opt-in, which matches the language/locale policy concern.
The file uses fixed locales such as 'en-CA' and 'en-US' for date formatting and later recognizes only English and Chinese natural-language period phrases. This imposes a language/locale assumption without any user opt-in or documented choice, which matches the policy category for language or locale constraints.
The natural-language branches match phrases like 'yesterday', 'today', 'last-week', Chinese date expressions, and English month names, but there is no mechanism for users to choose or discover supported languages. This is a natural-language policy concern because the skill behavior is language-constrained without explicit opt-in.
Detected: suspicious.dangerous_exec