T09 · Insecure Skill Coding Practices
Error
- Location
- REFERENCE.md:458
- Finding
- Persistent Browser Profile Retains Passwords and Authenticated Sessions## Vulnerability Details **File Location**: `REFERENCE.md:458-459` (also documented at `REFERENCE.md:16, 315, 374` and `EXAMPLES.md:114, 144`) **Vulnerability Type**: Persistent storage of sensitive authentication data **Risk Level**: High ### Vulnerable Code or Configuration ```text ### Credential Handling - Browser uses persistent profile (`.chrome-profile/`) - Saved passwords and cookies persist between sessions - Consider using isolated profiles for sensitive operations ``` The cleanup behavior explicitly preserves this profile: ```text - Does NOT delete `.chrome-profile/` directory (preserved for reuse) ``` The documented login workflow enters a password into this persistent browser environment: ```bash browser act "Fill in the password field with 'mypassword'" ``` ### Technical Analysis The browser is launched with `.chrome-profile/` as a persistent user-data directory. Authentication cookies, site storage, browsing history, and potentially saved passwords therefore survive browser termination. The `close` operation does not delete the profile. This violates least-retention principles for automation that may process credentials. Data is retained in a predictable relative path and may be reused by later invocations. Any subsequent process or automation task with access to the project directory and browser profile could potentially recover browser-state data or launch Chrome with the same authenticated sessions. The documentation recommends isolated profiles for sensitive operations, but isolation is not the documented default and no automatic expiration, permission hardening, encryption, or secure deletion is described. ### Attack Path 1. A user invokes the Skill to authenticate to a website. 2. The automation enters the user's password and receives an authenticated session cookie. 3. Chrome stores session data in `.chrome-profile/`. 4. The user invokes `browser close`, but the profile remai ...[truncated 727 chars]
- Remediation
- ## Remediation Suggestions - Create a unique, randomly named temporary Chrome profile for each automation task. - Delete the temporary profile during normal cleanup and in error-handling or termination hooks. - Make persistent sessions opt-in and require explicit user confirmation. - Disable browser password saving and credential autofill for automation profiles. - Restrict profile-directory permissions to the current operating-system user. - Never place profiles containing credentials in shared workspaces or source-control directories. - Provide a dedicated command that securely clears cookies, local storage, caches, and profile data. - Document that `browser close` does not log users out, and recommend server-side session revocation after sensitive workflows. - Avoid placing plaintext passwords directly in command-line arguments because they may be retained in shell history or visible in process listings.
