Skip to content

Schema: Mismatching persisted queries and schema

Identifier: mismatching_persisted_queries_and_schema

Scanner(s) Support

GraphQL Scanner REST Scanner WebApp Scanner

Description

Persisted queries are like pre-written commands your system stores so it doesnt have to build each query from scratch every time. When these saved queries dont line up with changes made to the APIs schema, the application might send old or mistyped commands that no longer match the systems current layout. This mismatch causes failures or unexpected behavior and can inadvertently open up weaknesses if those stale queries arent carefully checked or updated. Developers sometimes assume the stored queries will always be correct, even when the underlying data model changes, which leads to errors and potential security issues if the system ends up processing unintended or insecure commands.

Configuration

Example

Example configuration:

---
security_tests:
  mismatching_persisted_queries_and_schema:
    assets_allowed:
    - REST
    - GRAPHQL
    - WEBAPP
    skip: false

Reference

assets_allowed

Type : List[AssetType]*

List of assets that this check will cover.

skip

Type : boolean

Skip the test if true.