T09 · Insecure Skill Coding Practices
- Location
scripts/setup.sh:24- Finding
API Tokens Are Collected Visibly and Stored Without Explicit Access Restrictions
- Content
View full analysis
> "$CONFIG_DIR/config" echo "" echo "5. In Notion, create or open the page where you want your planning hub" echo "6. Click ··· → Connections → select '4To1 Planner'" echo "7. Copy the page ID from the URL (the 32-char hex string after the page name)" echo "" read -p "Paste the parent page ID: " parent_page echo "NOTION_PARENT_PAGE=$parent_page" >> "$CONFIG_DIR/config" ``` ```bash echo "📋 Todoist Setup:" echo "1. Go to https://app.todoist.com/app/settings/integrations/developer" echo "2. Copy your API token" echo "" read -p "Paste your Todoist API token: " todoist_key echo "TODOIST_API_KEY=$todoist_key" >> "$CONFIG_DIR/config" ``` ### Technical Analysis The setup script uses ordinary `read -p` prompts for Notion and Todoist credentials. This causes the credentials to remain visible while they are typed and may expose them to screen recording, shoulder surfing, terminal capture, or other monitoring of the interactive session. The credentials are subsequently written in plaintext under `~/.config/4to1/config`. The script does not establish a restrictive `umask`, assign mode `0700` to the configuration directory, or assign mode `0600` to the credential file. The actual permissions therefore depend on the invoking user's environment and default `umask`. Under a permissive configuration, other local a ...[truncated 1528 chars]- Remediation
View remediation
> "$CONFIG_DIR/config" ``` 4. Prefer an operating-system credential store, such as macOS Keychain, Secret Service, or an equivalent secure secret manager. Keep only non-sensitive backend selection and identifiers in the configuration file. 5. Validate expected token formats before storage and reject line breaks, shell metacharacters, or unexpected control characters. 6. Document the credential scope required by the Skill and advise users to grant the minimum possible Notion integration access. ]]>
