Hacktoberfest 2026: as issues que os mantenedores marcaram para outubro, abertas e boas para iniciantes. Ver issues do Hacktoberfest

GoogleOidcVerifier treats string "false" as a verified email claim

Aberta Para iniciantes
#7,289 1 comentário 0 reações 0 responsáveis Ver no GitHub

Mantenedores costumam responder em até 1 dia

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
2/5
Tempo estimado
1-3 horas
Facilidade para iniciantes
82/100
Tipo de issue
Bug
Clareza
Claramente especificada
Status de atividade
Ativa
Stack de tecnologia
python

Direção de pesquisa

Comece em src/google/adk/cli/trigger_routes.py, em GoogleOidcVerifier, e inspecione como o claim email_verified é verificado. Reproduza os casos booleanos e de string listados e, em seguida, confirme que o verificador aceita apenas um valor True real, preservando a verificação do e-mail incluído na allowlist.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

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.

Linguagem predominante
Python
Estrelas
21.6k
Forks
4k
Merge médio
6h 56min
PRs com merge (30d)
7

Preparar o ambiente

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de google/adk-python

Todas as issues de google/adk-python

Issues semelhantes

Mais issues de Python

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.