T09 · Insecure Skill Coding Practices
- Location
README.md:22- Finding
Unsafe plaintext persistence and source-code placement of bearer API keys
- Content
View full analysis
Vulnerability Details
File Locations:
README.md:22examples/get-trip.sh:4-9examples/list-trips.sh:5-9
Vulnerability Type: Plaintext sensitive credential storage
Risk Level: MediumVulnerable Code
README.md:22:markdown 2. Store the key in your agent config or TOOLS.mdexamples/get-trip.sh:4-9:bash API_KEY="ubt_k1_your_key_here" TRIP_ID="550e8400-e29b-41d4-a716-446655440000" curl -s \ -H "Authorization: Bearer $API_KEY" \ https://ubtrippin.xyz/api/v1/trips/$TRIP_ID \examples/list-trips.sh:5-9:bash API_KEY="ubt_k1_your_key_here" curl -s \ -H "Authorization: Bearer $API_KEY" \ https://ubtrippin.xyz/api/v1/trips \Technical Analysis
The README explicitly recommends storing the UBTRIPPIN bearer token in an agent configuration file or
TOOLS.md. The shell examples similarly encourage users to replace a placeholder with a real API key directly in the script.The distributed values are placeholders rather than active credentials, so the package does not itself disclose a working secret. However, following these instructions can cause a real bearer credential to be stored in plaintext within a workspace or source-controlled file. Such files may be exposed through repository commits, backups, diagnostic bundles, agent context collection, overly broad filesystem permissions, or command output.
This guidance also conflicts with
SKILL.md:882, which states that the API key should not be stored beyond the session unless the user explicitly requests it. No secure storage mechanism or restrictive permission guidance is supplied.Attack Path
- A user generates a valid UBTRIPPIN API key.
- Following the README or examples, the user places the key in
TOOLS.md, an agent configuration file, or one of the shell scripts. - The plaintext file is committed to source control, included in a backup or support archive, exposed to another local process or user, or supplied to an agent as works ...[truncated 1199 chars]
- Remediation
View remediation
Remediation Suggestions
- Remove the recommendation to store API keys in
TOOLS.mdor other files likely to be committed, indexed, or included in agent context. - Change the shell examples to obtain the key from a protected environment variable:
bash #!/usr/bin/env bash set -euo pipefail : "${UBTRIPPIN_API_KEY:?Set UBTRIPPIN_API_KEY through a secure secret provider}" curl --fail --silent --show-error \ -H "Authorization: Bearer ${UBTRIPPIN_API_KEY}" \ "https://www.ubtrippin.xyz/api/v1/trips"- Recommend an operating-system credential store, platform secret manager, or agent-specific encrypted secret facility instead of plaintext workspace files.
- If file-based storage is unavoidable, require a file outside the repository with restrictive permissions such as
0600, and ensure it is excluded through.gitignore. - Warn users not to expose bearer tokens in logs, screenshots, shell history, support bundles, or prompts.
- Make persistent storage opt-in and require explicit user consent, consistent with
SKILL.md:882. - Document immediate revocation and rotation procedures for suspected credential exposure.
- Where supported by the service, use narrowly scoped and short-lived tokens so compromise does not grant access to every documented API operation.
The pre-scan warning concerning remote payload execution was also manually checked.
examples/get-trip.shandexamples/list-trips.shsend HTTPS API requests withcurland pipe JSON responses only topython3 -m json.tool; they do not pipe remote content tobash, useeval, or otherwise execute a remotely retrieved script.- Remove the recommendation to store API keys in
