T09 · Insecure Skill Coding Practices
- Location
SKILL.md:15- Finding
Long-Lived Session Bearer Token Exposed Through URLs and Redirects
- Content
View full analysis
`). Set once after Step 1 and reused verbatim for **every** backend API call and the next session. Re-authorize only when the API returns `401`. ... - **Token lifetime (checked)**: login/session JWT is long-lived (`jwt.expiration` ≈ 7 years). ``` ```markdown Connect Google Business = {API_BASE_URL}/oauth2/connectGoogleBusiness?token=&redirectState= ``` ```markdown 1. `POST /oauth2/handoff/create` with `returnUrl=` (e.g. a URL the invoking application — workbuddy / openclaw — listens on). Response `data.handoffId` (one-time slot, usable for 3 min). If `returnUrl` is omitted the login falls back to the product login page. 2. Give the merchant this URL: `{API_BASE_URL}/oauth2/authorization/google-autoreply?handoffId=` and ask them to complete the sign-in. After login the browser is **redirected back to `returnUrl` with `token` & `tokenHead` appended** (e.g. `returnUrl?token=...&tokenHead=...`). ``` ```markdown {API_BASE_URL}/oauth2/connectGoogleBusiness?token=&redirectState= ``` ### Technical Analysis The Skill directs the agent to place a reusable bearer credential in URL query parameters in two flows: 1. The Google Business connection URL includes the session token as the `token` query parameter. 2. The SSO callback appends `token` and `tokenHead` to the configured `returnUrl`. URL encoding does not protect a credential from disclosure. Query strings may be retained or transmitted through: - Browser history and address-bar synchronization. - Revers ...[truncated 3074 chars]- Remediation
View remediation
