T05 · Unauthorized Access and Privilege Escalation
- Location
scripts/onboarding.py:402- Finding
Undeclared authentication, credential forwarding, and billing capabilities exceed the Skill's required privileges
- Content
View full analysis
dict: """New-user credit activation. Failure does not block the flow.""" resp = _http_post(f"{_agent_user_base()}/account/loginByToken", { "token": access_token, "refreshToken": refresh_token, "device": {"aid": "3026344186", "did": "", "type": "Windows", "os": "10", "model": "149.0.0.0", "brand": "Chrome"}, }, _headers("agent-linkfox-web", "agent.linkfox.com", access_token=access_token)) if "_error" in resp: return {"error": f"loginByToken: {resp.get('_body') or resp['_error']}"} if resp.get("errcode") != 200: return {"error": f"loginByToken: {resp.get('errmsg') or json.dumps(resp, ensure_ascii=False)}"} print(f"{TAG} loginByToken succeeded and new-user credits were activated", file=sys.stderr) return {} def _fetch_user_info_v3(access_token: str, user_id: str) -> dict: """Obtain group_id and member_id from userInfo.""" resp = _http_post(f"{_login_base()}/linkFoxApp/api/userCenter/userInfo", {}, _headers("agent-linkfox-web", "agent.linkfox.com", access_token=access_token, user_id=user_id)) if "_error" in resp: return {"error": f"userInfo: {resp.get('_body') or resp['_error']}"} if resp.get("code") != "OK": return {"error": f"userInfo: {resp.get('message') or json.dumps(resp, ensure_ascii=False)}"} teams = (resp.get("data") or {}).get("teamList") or [] if not teams: return {"error": "userInfo: no team workspace is enabled"} selected = (next((t for t in teams if t.get("isSelect") == 1 and t.get("agentTeamId")), None) or next((t for t in teams if t.get("agentTeamId")), None)) ...[truncated 4312 chars]- Remediation
View remediation
