T09 · Insecure Skill Coding Practices
- Location
SKILL.md:125- Finding
API Key Persisted in Plaintext Configuration Files
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 125–128 and 269–276
Vulnerability Type: Plaintext credential storage
Risk Level: MediumVulnerable Code
bash export TRANSITION_API_KEY="your_api_key_here"The documentation then recommends adding this command to
~/.bashrcor~/.zshrcfor persistence.A second documented configuration method also stores the credential in plaintext:
bash # Method 1: Environment variable (recommended) export TRANSITION_API_KEY="sk_your_key_here" # ... # Method 2: Configuration file cat > ~/.apple-health.env << 'EOF' TRANSITION_API_KEY=sk_your_key_here EOF # ... source ~/.apple-health.envTechnical Analysis
The Skill recommends persisting the Transition API key in shell startup files or a plaintext environment file. It does not instruct the user to apply restrictive permissions to these files.
Shell startup files may be exposed through permissive home-directory permissions, system backups, diagnostic archives, support bundles, accidental synchronization, or unrelated local processes running under the same account. The documented
catcommand creates the environment file using the user's currentumask; if that configuration permits group or world access, the credential may be readable by other local users.Because the key authenticates requests to a service containing Apple Health information, disclosure could permit unauthorized access to endpoints available under the victim's Transition account. This issue does not itself grant operating-system privileges beyond those already held by an attacker capable of reading the file.
Attack Path
- A user follows the Skill and stores
TRANSITION_API_KEYin~/.bashrc,~/.zshrc, or~/.apple-health.env. - The resulting file is retained in plaintext and may be created without explicitly restrictive permissions.
- An attacker obtains read access through a local account, ...[truncated 795 chars]
- A user follows the Skill and stores
- Remediation
View remediation
Remediation Suggestions
-
Prefer an operating-system credential manager, such as macOS Keychain, Windows Credential Manager, or a Linux secret service.
-
Do not recommend storing long-lived credentials directly in
.bashrcor.zshrc. -
If file-based storage is unavoidable, create the file with restrictive permissions:
bash umask 077 printf '%s\n' 'TRANSITION_API_KEY=replace_with_key' > ~/.apple-health.env chmod 600 ~/.apple-health.env -
Verify that the parent home directory is not accessible to untrusted local users.
-
Exclude credential files from source control, cloud synchronization, diagnostics, and unencrypted backups.
-
Avoid printing or logging the credential.
-
Document API-key revocation and rotation procedures.
-
Where supported, use narrowly scoped, short-lived credentials rather than a long-lived account key.
-
