T09 · Insecure Skill Coding Practices
- Location
scripts/force-login.js:64- Finding
Insecure Storage and Logging of Pinterest Session Cookies
- Content
View full analysis
c.name.includes('sess') || c.name.includes('token') || c.name.includes('auth') ); importantCookies.forEach(c => { console.log(` - ${c.name}: ${c.value.slice(0, 50)}...`); }); ``` Another affected login flow uses the same unprotected write pattern: ```javascript // Save cookies const cookies = await context.cookies(); fs.writeFileSync(COOKIES_FILE, JSON.stringify(cookies, null, 2)); console.log(`✓ Cookies saved to ${COOKIES_FILE}`); ``` ### Technical Analysis Pinterest authentication cookies are bearer credentials. Anyone who obtains a valid session cookie may be able to impersonate the authenticated user without knowing the account password or completing multi-factor authentication. The scripts serialize the complete browser cookie set to `~/.config/pinterest/cookies.json` without specifying an explicit file mode. Consequently, access permissions depend on the runtime environment's `umask`. On a permissively configured or shared system, other local users or processes may be able to read the file. In addition, `force-login.js` deliberately prints the first 50 characters of cookies whose names contain `sess`, `token`, or `auth`. These values can enter terminal history, CI output, remote support logs, shell-session record ...[truncated 1785 chars]- Remediation
View remediation
