T05 · Unauthorized Access and Privilege Escalation
- Location
scripts/auth.py:24- Finding
Broad Google Workspace authorization is delegated to an unverifiable third-party OAuth service
- Content
View full analysis
"') webbrowser.open(login_url) return ``` ```python def save(token: str): """Save token from hosted OAuth.""" CREDS_DIR.mkdir(exist_ok=True) try: # Decode base64 token creds_json = base64.b64decode(token).decode("utf-8") creds_data = json.loads(creds_json) # Validate required fields required = ["token", "refresh_token", "client_id", "client_secret"] missing = [f for f in required if f not in creds_data] if missing: print(f"ERROR: Invalid token (missing: {', '.join(missing)})") sys.exit(1) # Save in google-auth format ...[truncated 3434 chars]- Remediation
View remediation
