Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

GoogleOidcVerifier treats string "false" as a verified email claim

オープン 初心者向け
#7,289 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
82/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
python

調査の方向性

src/google/adk/cli/trigger_routes.py の GoogleOidcVerifier から開始し、email_verified claim がどのようにチェックされているかを調べます。列挙された boolean と string のケースを再現し、そのうえで、allowlist に登録されたメールアドレスのチェックを維持したまま、verifier が実際の True 値だけを受け入れることを確認します。

索引モデルが issue の本文から書いたものです。

説明

Summary

GoogleOidcVerifier currently checks the email_verified claim using Python truthiness:

if (
    not claims.get("email_verified")
    or claims.get("email") not in self._allowed_emails
):

A non-empty string such as "false" is truthy in Python, so it passes this check when the email is allowlisted.

Reproduction

Using the same condition as the current verifier:

email_verified=False   -> REJECT
email_verified="false" -> ACCEPT
email_verified=True    -> ACCEPT
email_verified=""      -> REJECT

The relevant implementation is in:

src/google/adk/cli/trigger_routes.py → GoogleOidcVerifier.

Expected behavior

The verifier should require an actual boolean True, for example:

claims.get("email_verified") is True

or otherwise validate the claim type explicitly before trusting it.

Context

This behavior was also publicly noted in google/adk-go commit 490f24cbc3aa7a9f9472175ba0d848530dc5b4f4, which states that ADK Python's truthiness check accepts non-empty strings including "false".

I have not identified a production Google-issued ID-token path that currently emits email_verified as the string "false", so I am reporting this as a correctness / defensive validation issue rather than claiming a demonstrated authentication bypass.

主要言語
Python
スター
21.6k
フォーク
4k
平均マージ
6時間 56分
マージ済み PR(30日)
7

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

google/adk-python のほかの issue

google/adk-python の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。