T09 · Insecure Skill Coding Practices
- Location
SKILL.md:66- Finding
Plaintext API Credential Configuration
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 66–69
Vulnerability Type: Plaintext sensitive credential storage
Risk Level: MediumVulnerable Code
yaml store: platform: "shopify" api_key: "shpat_xxxxx" store_url: "https://your-store.myshopify.com"Technical Analysis
The quick-start example directs users to place a Shopify API credential directly in
ecommerce-config.yaml. Although the displayed value is a placeholder rather than an active secret, users following the example are likely to replace it with a live token stored in plaintext.The documentation does not instruct users to retrieve the credential from an environment variable or secret manager. It also provides no guidance concerning restrictive file permissions, source-control exclusions, output redaction, least-privilege token scopes, or credential rotation.
Attack Path
- A user copies the example into
ecommerce-config.yaml. - The user replaces
shpat_xxxxxwith a valid Shopify access token. - The plaintext configuration is committed to source control, copied into a backup, shared with another party, exposed in CI artifacts, or read by another local user.
- An attacker extracts the token.
- The attacker submits authenticated Shopify API requests using the stolen token.
- The attacker accesses or modifies resources allowed by the token's configured scopes.
Impact Assessment
Exploitation requires access to a copy of the resulting configuration file or another location where its contents have been replicated. The attack does not inherently provide operating-system privilege escalation.
The attacker would inherit the Shopify API privileges assigned to the exposed token. Depending on its scopes, this could permit unauthorized access to store, product, inventory, order, or customer information and could allow unauthorized product, price, inventory, or order modifications. The affected scope is ...[truncated 68 chars]
- A user copies the example into
- Remediation
View remediation
Remediation Suggestions
-
Replace the inline credential with an environment-variable or secret-manager reference, for example:
yaml store: platform: "shopify" api_key_env: "SHOPIFY_ACCESS_TOKEN" store_url: "https://your-store.myshopify.com" -
Document secure injection of
SHOPIFY_ACCESS_TOKENat runtime without writing it into the workflow file. -
Add
ecommerce-config.yamland other local secret-bearing configuration files to.gitignore. -
Require restrictive filesystem permissions, such as owner-only read and write access.
-
Use a dedicated token with only the minimum Shopify scopes required by the enabled workflow.
-
Redact credentials from command output, logs, exceptions, audit records, and generated reports.
-
Scan repositories and CI artifacts for accidentally committed credentials.
-
Immediately revoke and rotate any token that may have been committed, shared, logged, or backed up insecurely.
-
