T09 · Insecure Skill Coding Practices
- Location
SKILL.md:36- Finding
API Key Stored Without Enforced Restrictive File Permissions
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:36-44(also documented inREADME.md:26-34)
Vulnerability Type: Plaintext secret stored with potentially insecure permissions
Risk Level: MediumVulnerable Code Snippet:
bash mkdir -p ~/.config/soccer-cli touch ~/.config/soccer-cli/config.yamlyaml apikey: YOUR_API_KEY_HERETechnical Analysis
The documented configuration procedure stores the API-Football key in a plaintext file but does not enforce owner-only permissions on either the configuration directory or file. The resulting permissions depend on the user's current
umaskand any preexisting directory permissions. For example, a commonumaskof022can create the file with mode0644, allowing other local users to read it when the home directory is traversable.The application subsequently reads this credential and transmits it in the
x-apisports-keyHTTPS request header. No hardcoded credential or transmission to an undeclared host was identified, but disclosure of the configuration file would expose the user's API credential.Attack Path
- A user follows the documented commands to create
~/.config/soccer-cli/config.yaml. - The file is created under a permissive
umaskor inside an inadequately protected home/configuration directory. - Another local account enumerates readable files under the victim's configuration directory.
- The attacker reads the plaintext
apikeyvalue. - The attacker submits API-Football requests using the stolen key.
Exploitation requires local access and filesystem permission to traverse the relevant parent directories.
Impact Assessment
An attacker may obtain the API-Football key and make requests under the victim's account. This can consume API quota, interfere with availability, and potentially cause account-level or billing consequences depending on the associated subscription. The issue does not grant operating- ...[truncated 80 chars]
- A user follows the documented commands to create
- Remediation
View remediation
Remediation Suggestions
- Replace the documented creation procedure with commands that enforce owner-only access:
bash install -d -m 700 "$HOME/.config/soccer-cli" install -m 600 /dev/null "$HOME/.config/soccer-cli/config.yaml" - Update both
SKILL.mdandREADME.mdso their instructions are consistent. - At runtime, inspect the configuration file's permission bits and reject or prominently warn about files readable or writable by group or other users.
- Ensure the application does not print the API key in errors, diagnostics, or debug logs.
- Document key rotation as the response to suspected configuration-file disclosure.
- Replace the documented creation procedure with commands that enforce owner-only access:
