graphql-python / graphql-python/graphql-core
construction fails for depth around > 200 / resource exhaustion?
- Linguagem predominante
- Python
- Estrelas
- 531
- Forks
- 146
- Métricas de merge de PRs
- Nenhum PR com merge em 30d
Descrição
# Reporting issues with GraphQL-core 3
In my tests the construction of a deep request tree fails with recursion problems.
The problem is a recursive approach in the generation of the graphql request tree (this is why I created the test).
Next to denial of service it is most probably possible to cause resource exhaustion attacks by passing big graphs.
There should be two changes:
- a "stack free" (not really stack free but the recursion depth is drastically reduced) approach in generating the input graph. I did something with generators in my project: graphene-protector:
https://github.com/devkral/graphene-protector
- a node limit after which the generation of the input graph is stopped with an error
I am not sure if the cost spec ( https://ibm.github.io/graphql-specs/cost-spec.html ) can fix this. The changes must take place while generating the requested input graph
Guia de contribuição
Nenhum guia de contribuição indexado para este repositório
Direção de pesquisa
Comece localizando a geração recursiva da árvore de requisições/entradas do GraphQL e o teste de construção de requisições profundas mencionado na issue. Reproduza a falha de recursão com uma profundidade acima de 200 e, em seguida, avalie uma abordagem iterativa ou baseada em geradores e um limite de nós. Está concluído quando grafos profundos ou grandes demais falharem com segurança e com um erro claro, em vez de esgotarem os recursos.
Escrita pelo modelo de indexação a partir do texto da issue.
Avaliação
- Stack de tecnologia
- graphql, python
- Domínio
- api, security
- Tipo de issue
- Bug
- Dificuldade
- 5/5
- Tempo estimado
- Mais de uma semana
- Status de atividade
- Ativa
- Clareza
- Razoavelmente clara
- Facilidade para iniciantes
- 35/100