Back to skill

Security audit

icosmos.space

Security checks for vulnerabilities and agentic risk

Overview

This Shopify skill is mostly coherent, but it asks to cache high-privilege store tokens locally without saying where or how they are protected.

Install only if you trust the referenced icosmos-shopify CLI and the Supabase account behind it. Before use, confirm where Shopify tokens are cached, who can read that cache, how to delete or rotate tokens, and whether the Shopify app uses least-privilege scopes. Treat the environment email/password and cached tokens as sensitive secrets, and use --confirm only when you intend to publish a blog post.

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:17
Finding

Administrative Shopify Tokens Stored in an Undocumented Local Cache

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 17-18 and 52-60
Vulnerability Type: Insecure local storage of sensitive credentials and administrative tokens
Risk Level: Medium

Relevant snippet (English translation of the audited documentation):

markdown
1. `setup once`: Use `ICOSMOS_USER_EMAIL` / `ICOSMOS_USER_PASSWORD`
   to synchronize stores and tokens into a local cache.

- Setup Once:
  - `ICOSMOS_USER_EMAIL`
  - `ICOSMOS_USER_PASSWORD`

  Both fields must be stored in system environment variables.

  The required command-line tool is `icosmos-shopify` in the current directory.

Technical Analysis

The documented setup workflow reads account credentials from environment variables, retrieves Shopify tokens through Supabase, and persists the resulting tokens in a local cache. The documentation does not define:

  • The location or ownership of the cache.
  • Required filesystem permissions.
  • Whether tokens are encrypted at rest.
  • Token retention, expiration, rotation, or deletion behavior.
  • Protections against inclusion in backups, diagnostic archives, or source-control commits.
  • Whether account passwords are removed from the process environment after setup.
  • Whether sensitive values can be exposed through process inheritance, crash reports, or debug logs.

Shopify administrative tokens can provide access to store configuration, products, orders, blogs, and potentially customer information, depending on their granted scopes. Storing such tokens without an explicit secure-storage design creates a credential-disclosure risk.

The project contains only SKILL.md; the referenced icosmos-shopify executable is absent. Consequently, the implementation of the cache, Supabase communication, token redaction, and file-permission controls could not be verified. This finding is therefore based on the documented security design rather than confirmation of a specific world-readable ca ...[truncated 1498 chars]

Remediation
View remediation

Remediation Suggestions

  1. Store Shopify tokens in an operating-system credential manager or dedicated secret-management service rather than an ordinary plaintext cache.
  2. If a local file is unavoidable, create it in a private user directory with restrictive permissions, such as owner-only read and write access, and reject unsafe ownership or permission states.
  3. Encrypt cached tokens at rest using a key that is not stored alongside the encrypted data.
  4. Do not persist ICOSMOS_USER_PASSWORD; use it only for initial authentication and remove it from the process environment as soon as practical.
  5. Prefer short-lived credentials and implement explicit expiration, rotation, revocation, and secure deletion procedures.
  6. Document the exact cache location, format, permissions, retention period, and cleanup command.
  7. Prevent the cache from being included in source control, backups, support bundles, telemetry, crash reports, and command output.
  8. Apply least-privilege Shopify scopes and use separate tokens for read-only auditing and confirmed publishing operations.
  9. Ensure logs redact complete credentials, authorization headers, environment values, and cache contents. Partial redaction should not be the sole protection.
  10. Include the icosmos-shopify implementation or reproducible source in the audited package so its authentication, storage, TLS validation, logging, and permission controls can be independently reviewed.
Vulnerability Patterns
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (2)

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 70)May include surrounding context.

md
## 常见问题与排障

- **401/403**:Admin token scopes 不足或 token 过期;确认 Shopify Custom App 的 Admin API access token 与权限。
- **429 Too Many Requests**:已做退避重试;如果频繁触发,降低并发/减少拉取字段/缩小时间范围。
- **Storefront 430 Security Rejection**:请求可能被判定为异常;需要检查请求来源、token 是否正确,必要时增加更真实的请求头策略(后续增强)。

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

L14 将“店铺审计、产品优化、转化下降、营销效果差、发布博客/引流文章”等宽泛业务诉求直接作为触发场景关键词,这些短语在日常电商讨论中较常见,且文档未提供负例或明确的非触发边界。虽然文件说明面向 OpenClaw,但没有把触发限制到更窄的命令词或特定上下文,容易与普通咨询类表述重叠。

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.