T09 · Insecure Skill Coding Practices
- Location
flight_pricer.py:88- Finding
Duffel API Key Stored Without Enforced Restrictive Permissions
- Content
View full analysis
``` ### Technical Analysis The configuration directory and credential file are created without explicitly enforcing restrictive permissions. Their effective permissions therefore depend on the operating system and the process umask. An existing configuration file also retains its previous permissions when overwritten. The implementation does not verify that the directory is restricted to the current user or that the file has mode `0600`. The API key is additionally accepted directly through `--api-key`. Command-line arguments may be retained in shell history and can be visible in process listings or process-inspection interfaces while the command is running. The documentation describes this mechanism as secure storage, but the implementation does not provide the permission controls necessary to support that claim. ### Attack Path 1. A victim runs `flight-pricer config set --api-key `. 2. The secret may be recorded in the victim's shell history or temporarily exposed through process arguments. 3. The program writes the secret to `~/.config/flight-pricer/config.yaml` without explicitly setting mode `0600`. 4. A local user or process with access to the h ...[truncated 674 chars]- Remediation
View remediation
