T09 · Insecure Skill Coding Practices
- Location
SKILL.md:69- Finding
API Key Requested Through Chat and Persisted in Plaintext
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 69-71
Vulnerability Type: Plaintext credential exposure and insecure secret management
Risk Level: HighVulnerable Code
markdown **API Key Setup (first time only)** If the curl commands below still contain `$TRACK123_API_KEY`, ask the user to visit **https://www.track123.com/api** → Dashboard → API tab → copy and paste the key here. Once received, replace `$TRACK123_API_KEY` in this skill file with the actual key value.Technical Analysis
The Skill instructs the user to paste a Track123 API key into the conversation and then directs the Agent to replace the environment-variable reference in
SKILL.mdwith the actual credential. This exposes the secret through two separate insecure channels:- The API key enters conversation history, Agent context, and potentially platform logs.
- The API key is persisted as plaintext in a project file that may be committed, backed up, scanned, packaged, or shared.
This behavior is unnecessary for the declared shipment-tracking functionality. The existing curl examples already reference
$TRACK123_API_KEY, so the credential can remain in a protected environment variable or secret manager without modifying the Skill file.The external Track123 requests themselves are relevant to the declared functionality. However, transmitting the API credential becomes unsafe when its value has first been collected through chat and embedded in a distributable file.
Attack Path
- A user invokes the Skill without a configured
TRACK123_API_KEY. - The Skill asks the user to paste the API key into the conversation.
- The key becomes available in conversation records, Agent context, telemetry, or other retained logs.
- The Agent replaces
$TRACK123_API_KEYinSKILL.mdwith the plaintext key. - The modified file is committed to source control, included in a backup or Skill package, or exposed to anothe ...[truncated 916 chars]
- Remediation
View remediation
Remediation Suggestions
-
Remove all instructions asking users to paste API keys into conversations.
-
Never replace
$TRACK123_API_KEYinSKILL.mdwith a literal credential. -
Require the key to be supplied through a protected environment variable or an approved secret manager.
-
Validate only whether the variable is configured; do not print, echo, log, or otherwise expose its value.
-
Document secure setup using a placeholder, for example:
markdown Configure `TRACK123_API_KEY` in your runtime's protected secret store before invoking this Skill. Do not paste the key into chat or save it in this project. -
Add secret-scanning controls to source-control and packaging workflows.
-
Ensure local secret configuration files are excluded through
.gitignoreand have restrictive filesystem permissions. -
Redact authorization headers from command output, debugging data, telemetry, and error reports.
-
If this instruction has already been followed, revoke and rotate the affected API key, remove it from the working tree, and purge it from source-control history and retained artifacts where feasible.
-
Inform users that tracking numbers are transmitted to Track123 and obtain consent before the first third-party request because shipment identifiers and returned location history may be privacy-sensitive.
-
