oauth-flow-test-author
Audited by Socket on Oct 12, 2026
2 alerts found:
SecurityAnomalyThe visible code has a significant authorization flaw: it assigns permissions from requested scopes without checking granted authority, potentially granting console:grant to users whose identity provider token has only console:read. It also does not bind the callback to the initiating browser despite the test and internal note claiming that it does; the cross-browser test can pass without enforcing this. State and nonce checks are present, but identity-token verification cannot be assessed without decodeIdToken. No clear malware behavior is visible.
No clear malicious behavior is present. The code appears to implement a mock OAuth-style authorization flow, but the redirect prefix check can route codes to lookalike URLs, and the mock token endpoint has incomplete redirect/client binding and optional PKCE enforcement. These are security weaknesses, not evidence of malware.