T09 · Insecure Skill Coding Practices
- Location
SKILL.md:15- Finding
Insecure Handling of Account Credentials and Shopify Access Tokens
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 15 and 47-54
Vulnerability Type: Credentials retained in environment variables and access tokens stored in an unspecified local cache
Risk Level: MediumEvidence
text 1. `setup once`: Use `ICOSMOS_USER_EMAIL` / `ICOSMOS_USER_PASSWORD` to synchronize stores and tokens to a local cache.text - Setup Once: - `ICOSMOS_USER_EMAIL` - `ICOSMOS_USER_PASSWORD` Both fields must be saved as system environment variables. The required command-line tool is `icosmos-shopify` in the current directory.The excerpts above are faithful English renderings of the corresponding instructions in
SKILL.md.Technical Analysis
The skill directs users to retain an account email and password in system environment variables and to synchronize Shopify access tokens into a local cache. It does not specify the cache location, encryption controls, owner-only file permissions, credential lifetime, deletion procedure, or access restrictions.
Environment variables can be inherited by child processes and may be exposed through diagnostic output, crash reports, process inspection mechanisms, or incorrectly configured execution environments. A local token cache without explicitly enforced permissions or encryption may be readable by other processes or local users.
The referenced
icosmos-shopifyexecutable is not included in the audited project. Consequently, the audit could not verify its authentication destination, cache implementation, file permissions, token encryption, redaction behavior, or deletion controls. The documentation later claims token redaction and suppression of sensitive order fields, but no implementation is present to substantiate those safeguards.Attack Path
- A user configures
ICOSMOS_USER_EMAILandICOSMOS_USER_PASSWORDas persistent system environment variables. - The skill invokes `icosmos-shopify setup once ...[truncated 1326 chars]
- A user configures
- Remediation
View remediation
Remediation Suggestions
- Replace persistent password environment variables with a short-lived authentication flow, delegated authorization, or narrowly scoped service token.
- Store secrets in an operating-system credential manager or dedicated secret-management service rather than in general process environments.
- If local caching is necessary, encrypt tokens at rest and create cache files with owner-only permissions, such as mode
0600on Unix-like systems. - Document the exact cache location, retention period, expiration behavior, rotation process, and secure deletion command.
- Prevent credentials and tokens from appearing in command-line arguments, logs, exceptions, telemetry, shell history, or diagnostic output.
- Apply least-privilege Shopify scopes and use separate read-only credentials for diagnostics. Obtain a distinct, explicitly authorized credential only when a write operation is required.
- Document and authenticate the remote service endpoint to which account credentials are submitted.
- Include the command-line implementation in the package for review, or distribute it as a version-pinned, signed artifact with published checksums and reproducible provenance.
- Add automated tests verifying token redaction, sensitive-field suppression, restrictive cache permissions, credential expiration, and cleanup behavior.
