corazawaf / coraza

OWASP Coraza WAF is a golang modsecurity compatible web application firewall library
https://www.coraza.io
Apache License 2.0
2.25k stars 222 forks source link

Add support for GraphQL #1091

Open fzipi opened 4 months ago

fzipi commented 4 months ago

Summary

While we have support for JSON, there is no explicit support for GraphQL as a content type we can parse.

I think there is enough interest in the community to bring protection to GraphQL, and Coraza should lead this.

References:

Motivation

Solutions

In this case the solution should focus more on defining first what we think protecting GraphQL means.

There is an existing graphql "armor" solution for nodejs, and this basically implements plugins with protections like https://escape.tech/graphql-armor/docs/category/plugins. Some of the plugins will apply in the request, but others apply at the response level.

This means that whatever we provide, it should come from making variables available in the rule language, so they can be checked with simple "seclang" rules. Or we can follow a different approach. Let's see first what we want to protect users from.

Suggested protections from documentation

Let's hear your thoughts first on what should be prevented, then we can think the how.

fzipi commented 3 months ago

@corazawaf/core-developers Thoughts/ideas?