T09 · Insecure Skill Coding Practices
- Location
scripts/config.json:2- Finding
Hardcoded SaleSmartly API Credential Distributed with the Skill
- Content
View full analysis
Vulnerability Details
File Location:
scripts/config.json:2-4
Vulnerability Type: Hardcoded API credential
Risk Level: Highjson "ss": { "apiKey": "19vLWeRmwTBscpES", "projectId": "b87x3n",Technical Analysis
The project contains a non-placeholder SaleSmartly API key in a committed configuration file. This key is subsequently used by
scripts/collect.pyas an HTTP bearer credential:python req.add_header("Authorization", f"Bearer {self.api_key}")Unlike the placeholder in
config.example.json, the value inconfig.jsonappears to be an actual credential. Any person or automated system with access to the project package can extract and attempt to use it. The exposure remains relevant even if the key is later deleted from the latest revision because it may persist in package archives, source-control history, caches, and backups.Attack Path
- An attacker downloads or otherwise obtains the skill package.
- The attacker opens
scripts/config.jsonand extracts the SaleSmartly API key and project identifier. - The attacker sends requests to the SaleSmartly API with the key in the
Authorization: Bearerheader. - Subject to the key's server-side permissions, the attacker queries session, message, or contact endpoints used by the collector.
- The attacker retrieves customer conversations and metadata or consumes the credential's API quota.
Impact Assessment
Successful exploitation could provide unauthorized access to the SaleSmartly resources authorized for this API key. The exposed scope may include customer names, contact identifiers, project identifiers, session metadata, and private conversation content. It could also permit API abuse and quota consumption. The exact privileges are limited by the permissions SaleSmartly assigned to the credential.
- Remediation
View remediation
Remediation Suggestions
- Revoke and rotate the exposed API key immediately.
- Remove
scripts/config.jsonfrom all distributed packages and source-control history. - Add
config.jsonand other secret-bearing files to.gitignoreand packaging exclusion rules. - Load the key from a protected environment variable or dedicated secret manager.
- Grant the replacement key only the minimum read permissions required by the collector.
- Add automated secret scanning to CI and release workflows.
- Review SaleSmartly access logs for use of the exposed key and investigate unexpected requests.
