T09 · Insecure Skill Coding Practices
- Location
SKILL.md:13- Finding
Unauditable External Executable Handles Account Credentials and Privileged Shopify Tokens
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 13–14 and 55–64
Vulnerability Type: Sensitive credential exposure and insecure local token storage
Risk Level: MediumRelevant Code Snippets:
text - **触发后执行顺序**: 1. `setup once`:用 `ICOSMOS_USER_EMAIL` / `ICOSMOS_USER_PASSWORD` 同步店铺与 token 到本地缓存text ## 依赖与配置 - Setup Onece: - `ICOSMOS_USER_EMAIL` - `ICOSMOS_USER_PASSWORD` 两个字段需要保存到系统环境变量 所需命令行工具为当前目录下的[icosmos-shopify](icosmos-shopify)Technical Analysis
The skill directs users to place an account email and password in environment variables and invoke an
icosmos-shopifyexecutable that retrieves Shopify domains and privileged tokens from Supabase. It then stores those tokens in an unspecified local cache.Environment variables may be inherited by child processes or exposed through process diagnostics, crash reports, debug output, or other software running under the same account. The document does not define the cache location, access permissions, encryption, retention period, deletion procedure, or token scope.
The referenced
icosmos-shopifyexecutable is absent from the audited project, which contains onlySKILL.md. Consequently, the audit cannot verify the executable's provenance, network destinations, credential handling, cache protections, or implementation of the claimed token redaction and write-confirmation safeguards. The documented masking of tokens in logs does not protect credentials held in the process environment or tokens stored in the local cache.Attack Path
- A user loads the skill and places
ICOSMOS_USER_EMAILandICOSMOS_USER_PASSWORDin system environment variables as instructed. - The user invokes
icosmos-shopify setup once. - The external executable receives the account credentials, authenticates to the associated service, and retrieves Shopify store tokens.
- The executable writes the retrieved tokens to an u ...[truncated 1240 chars]
- A user loads the skill and places
- Remediation
View remediation
Remediation Suggestions
- Include the referenced executable and its source code in the auditable package, or identify a pinned and cryptographically verifiable official distribution.
- Replace reusable password-based environment authentication with short-lived credentials, an OAuth authorization flow, or another revocable token mechanism.
- Avoid system-wide or persistent environment variables for passwords. If environment-based transfer is unavoidable, scope variables to a single process and remove them immediately after use.
- Store Shopify tokens in an operating-system credential manager or dedicated secret-management service rather than an unspecified plaintext cache.
- If a local cache is required, encrypt it, restrict permissions to the owning user, prevent symbolic-link attacks, use atomic file creation, and document its exact location.
- Define token retention, expiration, rotation, revocation, and secure-deletion procedures.
- Request the minimum Shopify API scopes required for each operation and separate read-only credentials from credentials capable of publishing content.
- Document and restrict all network endpoints contacted during setup, and validate their TLS certificates.
- Ensure secrets are excluded from logs, command output, exception traces, telemetry, and crash reports. Automated tests should verify these protections.
- Independently verify that blog publication cannot occur without explicit confirmation and that checkout diagnostics remain read-only.
