T09 · Insecure Skill Coding Practices
- Location
SKILL.md:113- Finding
Plaintext Storage and Backup of Sensitive Health Data
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:113,SKILL.md:177,SKILL.md:264-265, andSKILL.md:387-390
Vulnerability Type: Plaintext sensitive-data storage and unprotected backup
Risk Level: MediumVulnerable Code
python path.write_text(json.dumps(workout, ensure_ascii=False, indent=2))python path.write_text(json.dumps(record, ensure_ascii=False, indent=2))bash mkdir -p ~/.health/{workouts,sleep,diet,metrics,goals} echo '{"version":"1.0","edition":"free"}' > ~/.health/config.jsonbash tar -czf health-backup-$(date +%Y%m%d).tar.gz ~/.health/ rsync -av ~/.health/ ~/cloud/health-backup/Technical Analysis
The Skill stores workout, sleep, diet, profile, and other health information as plaintext JSON or YAML. It creates the health-data directories without explicitly enforcing restrictive permissions, and files created through
Path.write_text()inherit permissions determined by the user's currentumask.The backup procedure produces an unencrypted archive in the current working directory. Its accessibility likewise depends on ambient directory permissions and
umask. The optionalrsynccommand copies the same plaintext records into a potentially cloud-synchronized directory without adding encryption.Consequently, confidentiality depends on environmental defaults rather than security controls established by the Skill. This is particularly significant because the records may contain sensitive health measurements and personally identifying profile information.
Attack Path
- A user follows the Skill instructions and records health information under
~/.health/. - The files are written in plaintext with permissions derived from the existing
umask. - The user generates an unencrypted archive in the current directory or copies the records into a cloud-synchronized directory.
- Another local account, an application with access to th ...[truncated 936 chars]
- A user follows the Skill instructions and records health information under
- Remediation
View remediation
Remediation Suggestions
- Create the root data directory with owner-only permissions, such as mode
0700. - Create health-record and configuration files with mode
0600rather than relying on the ambientumask. - Use atomic file creation and explicitly set permissions after writing.
- Store backup archives in a dedicated owner-only directory instead of the current working directory.
- Encrypt backup archives with an authenticated encryption mechanism before storage or synchronization.
- Require clear user confirmation before copying health records into any cloud-synchronized location.
- Document the cloud provider's retention, sharing, and account-security implications.
- Avoid placing secrets or encryption keys in the same directory as the encrypted health records.
- Provide secure deletion, retention, and backup-restoration procedures for sensitive records.
- Create the root data directory with owner-only permissions, such as mode
