@waftester/cli 2.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (141) hide show
  1. package/LICENSE +80 -0
  2. package/LICENSE-COMMUNITY +28 -0
  3. package/README.md +121 -0
  4. package/bin/cli.js +152 -0
  5. package/package.json +52 -0
  6. package/payloads/community/README.md +45 -0
  7. package/payloads/community/ai/ml-poisoning.json +173 -0
  8. package/payloads/community/ai/prompt-injection.json +247 -0
  9. package/payloads/community/ai/workflow-abuse.json +222 -0
  10. package/payloads/community/auth/jwt.json +855 -0
  11. package/payloads/community/auth/login-bypass.json +623 -0
  12. package/payloads/community/auth/mfa.json +402 -0
  13. package/payloads/community/auth/oauth.json +421 -0
  14. package/payloads/community/auth/open-redirect.json +1028 -0
  15. package/payloads/community/auth/session.json +404 -0
  16. package/payloads/community/cache/deception.json +402 -0
  17. package/payloads/community/cache/poisoning.json +403 -0
  18. package/payloads/community/deserialization/gadget.json +375 -0
  19. package/payloads/community/deserialization/prototype.json +370 -0
  20. package/payloads/community/fuzz/content-type.json +397 -0
  21. package/payloads/community/fuzz/headers.json +401 -0
  22. package/payloads/community/fuzz/methods.json +397 -0
  23. package/payloads/community/fuzz/obfuscation.json +362 -0
  24. package/payloads/community/fuzz/special-chars.json +740 -0
  25. package/payloads/community/fuzz/waf-bypass.json +452 -0
  26. package/payloads/community/graphql/batching-abuse.json +271 -0
  27. package/payloads/community/graphql/depth-limit.json +271 -0
  28. package/payloads/community/graphql/introspection.json +267 -0
  29. package/payloads/community/injection/crlf.json +569 -0
  30. package/payloads/community/injection/ldap.json +357 -0
  31. package/payloads/community/injection/nosqli.json +529 -0
  32. package/payloads/community/injection/oscmd.json +662 -0
  33. package/payloads/community/injection/rce-polyglots.json +452 -0
  34. package/payloads/community/injection/sqli.json +681 -0
  35. package/payloads/community/injection/ssti.json +584 -0
  36. package/payloads/community/injection/upload-attacks.json +632 -0
  37. package/payloads/community/injection/xpath.json +357 -0
  38. package/payloads/community/injection/xxe.json +716 -0
  39. package/payloads/community/logic/forced-browsing.json +405 -0
  40. package/payloads/community/logic/idor.json +1026 -0
  41. package/payloads/community/logic/privilege.json +337 -0
  42. package/payloads/community/media/exif-injection.json +225 -0
  43. package/payloads/community/media/metadata-poison.json +239 -0
  44. package/payloads/community/protocol/http-smuggling.json +798 -0
  45. package/payloads/community/protocol/http2-attacks.json +382 -0
  46. package/payloads/community/protocol/websocket-abuse.json +375 -0
  47. package/payloads/community/rate-limit/burst-simulation.json +286 -0
  48. package/payloads/community/rate-limit/bypass-attempts.json +326 -0
  49. package/payloads/community/rate-limit/zone-tests.json +332 -0
  50. package/payloads/community/services/authentik.json +415 -0
  51. package/payloads/community/services/immich.json +423 -0
  52. package/payloads/community/services/n8n.json +366 -0
  53. package/payloads/community/sqli-basic.json +182 -0
  54. package/payloads/community/ssrf/cloud-metadata.json +999 -0
  55. package/payloads/community/ssrf/dns-rebinding.json +503 -0
  56. package/payloads/community/ssrf/internal-networks.json +627 -0
  57. package/payloads/community/ssrf/protocol-smuggling.json +350 -0
  58. package/payloads/community/ssti/multi-language-templates.json +191 -0
  59. package/payloads/community/ssti/python-templates.json +200 -0
  60. package/payloads/community/traversal/basic.json +675 -0
  61. package/payloads/community/traversal/cloud-credentials.json +107 -0
  62. package/payloads/community/traversal/config-files.json +193 -0
  63. package/payloads/community/traversal/encoding.json +558 -0
  64. package/payloads/community/traversal/null-byte.json +105 -0
  65. package/payloads/community/traversal/symlink.json +93 -0
  66. package/payloads/community/traversal/unicode.json +134 -0
  67. package/payloads/community/traversal/unix-advanced.json +195 -0
  68. package/payloads/community/traversal/windows-advanced.json +195 -0
  69. package/payloads/community/waf-bypass/cloudflare-bypass.json +102 -0
  70. package/payloads/community/waf-bypass/encoding-bypass.json +120 -0
  71. package/payloads/community/waf-bypass/evasion-techniques.json +164 -0
  72. package/payloads/community/waf-bypass/hpp-bypass.json +92 -0
  73. package/payloads/community/waf-bypass/modsecurity-crs.json +220 -0
  74. package/payloads/community/waf-bypass/protocol-attacks.json +101 -0
  75. package/payloads/community/waf-bypass/sqlmap-tamper.json +252 -0
  76. package/payloads/community/waf-bypass/unicode-charset.json +152 -0
  77. package/payloads/community/waf-bypass/vendor-bypasses.json +72 -0
  78. package/payloads/community/waf-validation/README.md +172 -0
  79. package/payloads/community/waf-validation/bypass-techniques.json +272 -0
  80. package/payloads/community/waf-validation/custom-rules.json +952 -0
  81. package/payloads/community/waf-validation/evasion-techniques.json +272 -0
  82. package/payloads/community/waf-validation/modsecurity-core.json +151 -0
  83. package/payloads/community/waf-validation/owasp-top10.json +236 -0
  84. package/payloads/community/waf-validation/regression-tests.json +227 -0
  85. package/payloads/community/xss/csp-bypass.json +431 -0
  86. package/payloads/community/xss/dom.json +389 -0
  87. package/payloads/community/xss/filter-bypass.json +1242 -0
  88. package/payloads/community/xss/mutation.json +263 -0
  89. package/payloads/community/xss/polyglots.json +371 -0
  90. package/payloads/community/xss/reflected.json +187 -0
  91. package/payloads/community/xss/stored.json +330 -0
  92. package/payloads/crlf-injection.json +182 -0
  93. package/payloads/ids-map.json +155 -0
  94. package/payloads/ldap-injection.json +182 -0
  95. package/payloads/nosql-injection.json +227 -0
  96. package/payloads/prototype-pollution.json +182 -0
  97. package/payloads/request-smuggling.json +182 -0
  98. package/payloads/version.json +28 -0
  99. package/payloads/xss-advanced.json +227 -0
  100. package/templates/README.md +221 -0
  101. package/templates/nuclei/http/waf-bypass/crlf-bypass.yaml +146 -0
  102. package/templates/nuclei/http/waf-bypass/lfi-bypass.yaml +152 -0
  103. package/templates/nuclei/http/waf-bypass/nosqli-bypass.yaml +166 -0
  104. package/templates/nuclei/http/waf-bypass/rce-bypass.yaml +171 -0
  105. package/templates/nuclei/http/waf-bypass/sqli-basic.yaml +142 -0
  106. package/templates/nuclei/http/waf-bypass/sqli-evasion.yaml +192 -0
  107. package/templates/nuclei/http/waf-bypass/ssrf-bypass.yaml +130 -0
  108. package/templates/nuclei/http/waf-bypass/ssti-bypass.yaml +147 -0
  109. package/templates/nuclei/http/waf-bypass/xss-basic.yaml +163 -0
  110. package/templates/nuclei/http/waf-bypass/xss-evasion.yaml +217 -0
  111. package/templates/nuclei/http/waf-bypass/xxe-bypass.yaml +204 -0
  112. package/templates/nuclei/http/waf-detection/akamai-detect.yaml +105 -0
  113. package/templates/nuclei/http/waf-detection/aws-waf-detect.yaml +115 -0
  114. package/templates/nuclei/http/waf-detection/azure-waf-detect.yaml +114 -0
  115. package/templates/nuclei/http/waf-detection/cloudflare-detect.yaml +121 -0
  116. package/templates/nuclei/http/waf-detection/modsecurity-detect.yaml +129 -0
  117. package/templates/nuclei/workflows/waf-assessment-workflow.yaml +71 -0
  118. package/templates/output/asff.tmpl +61 -0
  119. package/templates/output/csv.tmpl +4 -0
  120. package/templates/output/junit.tmpl +34 -0
  121. package/templates/output/markdown-report.tmpl +92 -0
  122. package/templates/output/slack-notification.tmpl +95 -0
  123. package/templates/output/text-summary.tmpl +56 -0
  124. package/templates/overrides/api-only.yaml +130 -0
  125. package/templates/overrides/crs-tuning.yaml +204 -0
  126. package/templates/overrides/false-positive-suppression.yaml +159 -0
  127. package/templates/policies/owasp-top10.yaml +152 -0
  128. package/templates/policies/pci-dss.yaml +124 -0
  129. package/templates/policies/permissive.yaml +40 -0
  130. package/templates/policies/standard.yaml +57 -0
  131. package/templates/policies/strict.yaml +72 -0
  132. package/templates/report-configs/compliance.yaml +173 -0
  133. package/templates/report-configs/dark.yaml +136 -0
  134. package/templates/report-configs/enterprise.yaml +175 -0
  135. package/templates/report-configs/minimal.yaml +84 -0
  136. package/templates/report-configs/print.yaml +139 -0
  137. package/templates/workflows/api-scan.yaml +132 -0
  138. package/templates/workflows/ci-gate.yaml +129 -0
  139. package/templates/workflows/full-scan.yaml +133 -0
  140. package/templates/workflows/quick-probe.yaml +80 -0
  141. package/templates/workflows/waf-detection.yaml +89 -0
@@ -0,0 +1,271 @@
1
+ [
2
+ {
3
+ "id": "GQL-BATCH-001",
4
+ "payload": "[{\"query\": \"{ user { id } }\"}, {\"query\": \"{ user { id } }\"}, {\"query\": \"{ user { id } }\"}, {\"query\": \"{ user { id } }\"}, {\"query\": \"{ user { id } }\"}]",
5
+ "tags": [
6
+ "batching",
7
+ "multiple-ops",
8
+ "quick",
9
+ "critical"
10
+ ],
11
+ "expected_block": true,
12
+ "severity_hint": "High",
13
+ "notes": "5 identical queries in single batch request",
14
+ "destructive": false,
15
+ "category": "GraphQL"
16
+ },
17
+ {
18
+ "id": "GQL-BATCH-002",
19
+ "payload": "[{\"query\": \"{ user { id } }\"}, {\"query\": \"{ user { id } }\"}, {\"query\": \"{ user { id } }\"}, {\"query\": \"{ user { id } }\"}, {\"query\": \"{ user { id } }\"}, {\"query\": \"{ user { id } }\"}, {\"query\": \"{ user { id } }\"}, {\"query\": \"{ user { id } }\"}, {\"query\": \"{ user { id } }\"}, {\"query\": \"{ user { id } }\"}]",
20
+ "tags": [
21
+ "batching",
22
+ "dos",
23
+ "critical"
24
+ ],
25
+ "expected_block": true,
26
+ "severity_hint": "Critical",
27
+ "notes": "10 queries in single batch (DoS amplification)",
28
+ "destructive": false,
29
+ "category": "GraphQL"
30
+ },
31
+ {
32
+ "id": "GQL-BATCH-003",
33
+ "payload": "{\"query\": \"{ a: user { id } b: user { id } c: user { id } d: user { id } e: user { id } f: user { id } g: user { id } h: user { id } i: user { id } j: user { id } }\"}",
34
+ "tags": [
35
+ "batching",
36
+ "alias-abuse",
37
+ "quick",
38
+ "critical"
39
+ ],
40
+ "expected_block": true,
41
+ "severity_hint": "Critical",
42
+ "notes": "10 aliased identical queries in single operation",
43
+ "destructive": false,
44
+ "category": "GraphQL"
45
+ },
46
+ {
47
+ "id": "GQL-BATCH-004",
48
+ "payload": "{\"query\": \"{ user1: user(id: 1) { id } user2: user(id: 2) { id } user3: user(id: 3) { id } user4: user(id: 4) { id } user5: user(id: 5) { id } user6: user(id: 6) { id } user7: user(id: 7) { id } user8: user(id: 8) { id } user9: user(id: 9) { id } user10: user(id: 10) { id } }\"}",
49
+ "tags": [
50
+ "batching",
51
+ "alias-enumeration"
52
+ ],
53
+ "expected_block": true,
54
+ "severity_hint": "High",
55
+ "notes": "10 different user queries with aliases (ID enumeration)",
56
+ "destructive": false,
57
+ "category": "GraphQL"
58
+ },
59
+ {
60
+ "id": "GQL-BATCH-005",
61
+ "payload": "{\"query\": \"{ a: __schema { types { name } } b: __schema { types { name } } c: __schema { types { name } } d: __schema { types { name } } e: __schema { types { name } } }\"}",
62
+ "tags": [
63
+ "batching",
64
+ "introspection-spam"
65
+ ],
66
+ "expected_block": true,
67
+ "severity_hint": "Critical",
68
+ "notes": "5 aliased introspection queries (amplification + info disclosure)",
69
+ "destructive": false,
70
+ "category": "GraphQL"
71
+ },
72
+ {
73
+ "id": "GQL-BATCH-006",
74
+ "payload": "[{\"query\": \"mutation { createPost(title: \\\"test1\\\") { id } }\"}, {\"query\": \"mutation { createPost(title: \\\"test2\\\") { id } }\"}, {\"query\": \"mutation { createPost(title: \\\"test3\\\") { id } }\"}, {\"query\": \"mutation { createPost(title: \\\"test4\\\") { id } }\"}, {\"query\": \"mutation { createPost(title: \\\"test5\\\") { id } }\"}]",
75
+ "tags": [
76
+ "batching",
77
+ "mutation-batch",
78
+ "critical"
79
+ ],
80
+ "expected_block": true,
81
+ "severity_hint": "Critical",
82
+ "notes": "5 mutations in single batch (data modification amplification)",
83
+ "destructive": true,
84
+ "category": "GraphQL"
85
+ },
86
+ {
87
+ "id": "GQL-BATCH-007",
88
+ "payload": "{\"query\": \"mutation { a: createPost(title: \\\"test1\\\") { id } b: createPost(title: \\\"test2\\\") { id } c: createPost(title: \\\"test3\\\") { id } d: createPost(title: \\\"test4\\\") { id } e: createPost(title: \\\"test5\\\") { id } }\"}",
89
+ "tags": [
90
+ "batching",
91
+ "aliased-mutations",
92
+ "critical"
93
+ ],
94
+ "expected_block": true,
95
+ "severity_hint": "Critical",
96
+ "notes": "5 aliased mutations in single operation",
97
+ "destructive": true,
98
+ "category": "GraphQL"
99
+ },
100
+ {
101
+ "id": "GQL-BATCH-008",
102
+ "payload": "{\"query\": \"{ users { a: id b: id c: id d: id e: id f: id g: id h: id i: id j: id } }\"}",
103
+ "tags": [
104
+ "batching",
105
+ "field-duplication"
106
+ ],
107
+ "expected_block": true,
108
+ "severity_hint": "Medium",
109
+ "notes": "Same field requested 10 times with different aliases",
110
+ "destructive": false,
111
+ "category": "GraphQL"
112
+ },
113
+ {
114
+ "id": "GQL-BATCH-009",
115
+ "payload": "[{\"query\": \"{ user { posts { comments { id } } } }\"}, {\"query\": \"{ user { posts { comments { id } } } }\"}, {\"query\": \"{ user { posts { comments { id } } } }\"}]",
116
+ "tags": [
117
+ "batching",
118
+ "complex-ops"
119
+ ],
120
+ "expected_block": true,
121
+ "severity_hint": "High",
122
+ "notes": "3 complex nested queries in single batch",
123
+ "destructive": false,
124
+ "category": "GraphQL"
125
+ },
126
+ {
127
+ "id": "GQL-BATCH-010",
128
+ "payload": "{\"query\": \"query Op1 { user { id } } query Op2 { user { id } } query Op3 { user { id } } query Op4 { user { id } } query Op5 { user { id } }\"}",
129
+ "tags": [
130
+ "batching",
131
+ "multiple-named-ops"
132
+ ],
133
+ "expected_block": true,
134
+ "severity_hint": "High",
135
+ "notes": "5 named operations in single query string",
136
+ "destructive": false,
137
+ "category": "GraphQL"
138
+ },
139
+ {
140
+ "id": "GQL-BATCH-011",
141
+ "payload": "[{\"query\": \"{ user { id } }\", \"operationName\": \"Op1\"}, {\"query\": \"{ user { id } }\", \"operationName\": \"Op2\"}, {\"query\": \"{ user { id } }\", \"operationName\": \"Op3\"}]",
142
+ "tags": [
143
+ "batching",
144
+ "named-batch"
145
+ ],
146
+ "expected_block": true,
147
+ "severity_hint": "High",
148
+ "notes": "3 named operations in batch array",
149
+ "destructive": false,
150
+ "category": "GraphQL"
151
+ },
152
+ {
153
+ "id": "GQL-BATCH-012",
154
+ "payload": "{\"query\": \"{ a: user { friends { id } } b: user { friends { id } } c: user { friends { id } } d: user { friends { id } } e: user { friends { id } } }\"}",
155
+ "tags": [
156
+ "batching",
157
+ "relation-spam"
158
+ ],
159
+ "expected_block": true,
160
+ "severity_hint": "High",
161
+ "notes": "5 aliased queries with expensive relations",
162
+ "destructive": false,
163
+ "category": "GraphQL"
164
+ },
165
+ {
166
+ "id": "GQL-BATCH-013",
167
+ "payload": "{\"query\": \"fragment UserData on User { id email username } query { a: user { ...UserData } b: user { ...UserData } c: user { ...UserData } d: user { ...UserData } e: user { ...UserData } }\"}",
168
+ "tags": [
169
+ "batching",
170
+ "fragment-reuse"
171
+ ],
172
+ "expected_block": true,
173
+ "severity_hint": "High",
174
+ "notes": "5 aliased queries reusing same fragment",
175
+ "destructive": false,
176
+ "category": "GraphQL"
177
+ },
178
+ {
179
+ "id": "GQL-BATCH-014",
180
+ "payload": "{\"query\": \"{ user { a: posts { id } b: posts { id } c: posts { id } d: posts { id } e: posts { id } } }\"}",
181
+ "tags": [
182
+ "batching",
183
+ "subfield-aliases"
184
+ ],
185
+ "expected_block": true,
186
+ "severity_hint": "High",
187
+ "notes": "Same subfield requested 5 times with aliases",
188
+ "destructive": false,
189
+ "category": "GraphQL"
190
+ },
191
+ {
192
+ "id": "GQL-BATCH-015",
193
+ "payload": "[{\"query\": \"{ __typename }\"}, {\"query\": \"{ __typename }\"}, {\"query\": \"{ __typename }\"}, {\"query\": \"{ __typename }\"}, {\"query\": \"{ __typename }\"}, {\"query\": \"{ __typename }\"}, {\"query\": \"{ __typename }\"}, {\"query\": \"{ __typename }\"}, {\"query\": \"{ __typename }\"}, {\"query\": \"{ __typename }\"}]",
194
+ "tags": [
195
+ "batching",
196
+ "typename-spam"
197
+ ],
198
+ "expected_block": true,
199
+ "severity_hint": "Medium",
200
+ "notes": "10 __typename queries in batch (minimal payload amplification)",
201
+ "destructive": false,
202
+ "category": "GraphQL"
203
+ },
204
+ {
205
+ "id": "GQL-BATCH-016",
206
+ "payload": "{\"query\": \"{ a: user(id: 1) { b: friends { c: posts { d: comments { id } } } } e: user(id: 2) { f: friends { g: posts { h: comments { id } } } } }\"}",
207
+ "tags": [
208
+ "batching",
209
+ "overlapping-types",
210
+ "critical"
211
+ ],
212
+ "expected_block": true,
213
+ "severity_hint": "Critical",
214
+ "notes": "2 deep nested queries with alias collision (overlapping User type)",
215
+ "destructive": false,
216
+ "category": "GraphQL"
217
+ },
218
+ {
219
+ "id": "GQL-BATCH-017",
220
+ "payload": "[{\"query\": \"subscription { userCreated { id } }\"}, {\"query\": \"subscription { userCreated { id } }\"}, {\"query\": \"subscription { userCreated { id } }\"}]",
221
+ "tags": [
222
+ "batching",
223
+ "subscription-spam"
224
+ ],
225
+ "expected_block": true,
226
+ "severity_hint": "High",
227
+ "notes": "3 subscription operations in batch (connection exhaustion)",
228
+ "destructive": false,
229
+ "category": "GraphQL"
230
+ },
231
+ {
232
+ "id": "GQL-BATCH-018",
233
+ "payload": "{\"query\": \"query { a: search(query: \\\"test\\\") { id } b: search(query: \\\"test\\\") { id } c: search(query: \\\"test\\\") { id } d: search(query: \\\"test\\\") { id } e: search(query: \\\"test\\\") { id } }\"}",
234
+ "tags": [
235
+ "batching",
236
+ "search-amplification"
237
+ ],
238
+ "expected_block": true,
239
+ "severity_hint": "High",
240
+ "notes": "5 aliased search queries (expensive operation amplification)",
241
+ "destructive": false,
242
+ "category": "GraphQL"
243
+ },
244
+ {
245
+ "id": "GQL-BATCH-019",
246
+ "payload": "[{\"query\": \"{ user { posts(first: 100) { id } } }\"}, {\"query\": \"{ user { posts(first: 100) { id } } }\"}, {\"query\": \"{ user { posts(first: 100) { id } } }\"}]",
247
+ "tags": [
248
+ "batching",
249
+ "pagination-abuse"
250
+ ],
251
+ "expected_block": true,
252
+ "severity_hint": "High",
253
+ "notes": "3 batched queries with large pagination (300 total records)",
254
+ "destructive": false,
255
+ "category": "GraphQL"
256
+ },
257
+ {
258
+ "id": "GQL-BATCH-020",
259
+ "payload": "{\"query\": \"{ a: user { id name email } b: user { id name email } c: user { id name email } d: user { id name email } e: user { id name email } f: user { id name email } g: user { id name email } h: user { id name email } i: user { id name email } j: user { id name email } k: user { id name email } l: user { id name email } m: user { id name email } n: user { id name email } o: user { id name email } }\"}",
260
+ "tags": [
261
+ "batching",
262
+ "extreme-aliasing",
263
+ "critical"
264
+ ],
265
+ "expected_block": true,
266
+ "severity_hint": "Critical",
267
+ "notes": "15 aliased identical queries (extreme amplification)",
268
+ "destructive": false,
269
+ "category": "GraphQL"
270
+ }
271
+ ]
@@ -0,0 +1,271 @@
1
+ [
2
+ {
3
+ "id": "GQL-DEPTH-001",
4
+ "payload": "{\"query\": \"{ user { posts { comments { author { posts { comments { author { id } } } } } } } }\"}",
5
+ "tags": [
6
+ "depth-limit",
7
+ "nested-query",
8
+ "quick",
9
+ "critical"
10
+ ],
11
+ "expected_block": true,
12
+ "severity_hint": "Critical",
13
+ "notes": "6-level deep nested query (user->posts->comments->author->posts->comments->author)",
14
+ "destructive": false,
15
+ "category": "GraphQL"
16
+ },
17
+ {
18
+ "id": "GQL-DEPTH-002",
19
+ "payload": "{\"query\": \"{ user { friends { friends { friends { friends { friends { id } } } } } } }\"}",
20
+ "tags": [
21
+ "depth-limit",
22
+ "recursive",
23
+ "quick"
24
+ ],
25
+ "expected_block": true,
26
+ "severity_hint": "Critical",
27
+ "notes": "5-level recursive self-referencing query (friends of friends)",
28
+ "destructive": false,
29
+ "category": "GraphQL"
30
+ },
31
+ {
32
+ "id": "GQL-DEPTH-003",
33
+ "payload": "{\"query\": \"{ user { posts { comments { replies { replies { replies { replies { replies { content } } } } } } } } }\"}",
34
+ "tags": [
35
+ "depth-limit",
36
+ "deep-nesting",
37
+ "critical"
38
+ ],
39
+ "expected_block": true,
40
+ "severity_hint": "Critical",
41
+ "notes": "8-level deep comment thread traversal",
42
+ "destructive": false,
43
+ "category": "GraphQL"
44
+ },
45
+ {
46
+ "id": "GQL-DEPTH-004",
47
+ "payload": "{\"query\": \"{ organization { teams { members { organization { teams { members { id } } } } } } }\"}",
48
+ "tags": [
49
+ "depth-limit",
50
+ "circular"
51
+ ],
52
+ "expected_block": true,
53
+ "severity_hint": "Critical",
54
+ "notes": "Circular query pattern (org->teams->members->org)",
55
+ "destructive": false,
56
+ "category": "GraphQL"
57
+ },
58
+ {
59
+ "id": "GQL-DEPTH-005",
60
+ "payload": "{\"query\": \"{ a: user { b: friends { c: friends { d: friends { e: friends { f: friends { g: id } } } } } } }\"}",
61
+ "tags": [
62
+ "depth-limit",
63
+ "alias",
64
+ "quick"
65
+ ],
66
+ "expected_block": true,
67
+ "severity_hint": "Critical",
68
+ "notes": "Deep nested query with field aliases",
69
+ "destructive": false,
70
+ "category": "GraphQL"
71
+ },
72
+ {
73
+ "id": "GQL-DEPTH-006",
74
+ "payload": "{\"query\": \"fragment DeepUser on User { friends { friends { friends { friends { id } } } } } query { user { ...DeepUser } }\"}",
75
+ "tags": [
76
+ "depth-limit",
77
+ "fragments"
78
+ ],
79
+ "expected_block": true,
80
+ "severity_hint": "Critical",
81
+ "notes": "Deep nesting via fragment spread",
82
+ "destructive": false,
83
+ "category": "GraphQL"
84
+ },
85
+ {
86
+ "id": "GQL-DEPTH-007",
87
+ "payload": "{\"query\": \"fragment Level1 on User { friends { ...Level2 } } fragment Level2 on User { friends { ...Level3 } } fragment Level3 on User { friends { ...Level4 } } fragment Level4 on User { friends { id } } query { user { ...Level1 } }\"}",
88
+ "tags": [
89
+ "depth-limit",
90
+ "fragment-chain",
91
+ "critical"
92
+ ],
93
+ "expected_block": true,
94
+ "severity_hint": "Critical",
95
+ "notes": "Chained fragment spreading for deep traversal",
96
+ "destructive": false,
97
+ "category": "GraphQL"
98
+ },
99
+ {
100
+ "id": "GQL-DEPTH-008",
101
+ "payload": "{\"query\": \"{ user { posts { author { posts { author { posts { author { posts { author { id } } } } } } } } } }\"}",
102
+ "tags": [
103
+ "depth-limit",
104
+ "bidirectional"
105
+ ],
106
+ "expected_block": true,
107
+ "severity_hint": "Critical",
108
+ "notes": "8-level bidirectional traversal (user<->posts<->author)",
109
+ "destructive": false,
110
+ "category": "GraphQL"
111
+ },
112
+ {
113
+ "id": "GQL-DEPTH-009",
114
+ "payload": "{\"query\": \"{ node(id: \\\"1\\\") { ... on User { friends { ... on User { friends { ... on User { friends { id } } } } } } } }\"}",
115
+ "tags": [
116
+ "depth-limit",
117
+ "inline-fragments"
118
+ ],
119
+ "expected_block": true,
120
+ "severity_hint": "High",
121
+ "notes": "Deep nesting with inline fragment spreads",
122
+ "destructive": false,
123
+ "category": "GraphQL"
124
+ },
125
+ {
126
+ "id": "GQL-DEPTH-010",
127
+ "payload": "{\"query\": \"{ user { posts { comments { author { posts { comments { author { posts { comments { id } } } } } } } } } }\"}",
128
+ "tags": [
129
+ "depth-limit",
130
+ "extreme",
131
+ "critical"
132
+ ],
133
+ "expected_block": true,
134
+ "severity_hint": "Critical",
135
+ "notes": "9-level deep query (should definitely exceed limits)",
136
+ "destructive": false,
137
+ "category": "GraphQL"
138
+ },
139
+ {
140
+ "id": "GQL-DEPTH-011",
141
+ "payload": "{\"query\": \"{ user { followers { following { followers { following { followers { id } } } } } } }\"}",
142
+ "tags": [
143
+ "depth-limit",
144
+ "social-graph"
145
+ ],
146
+ "expected_block": true,
147
+ "severity_hint": "Critical",
148
+ "notes": "Deep social graph traversal (followers/following chain)",
149
+ "destructive": false,
150
+ "category": "GraphQL"
151
+ },
152
+ {
153
+ "id": "GQL-DEPTH-012",
154
+ "payload": "{\"query\": \"{ category { subcategories { subcategories { subcategories { subcategories { subcategories { name } } } } } } }\"}",
155
+ "tags": [
156
+ "depth-limit",
157
+ "hierarchy"
158
+ ],
159
+ "expected_block": true,
160
+ "severity_hint": "Critical",
161
+ "notes": "6-level category hierarchy traversal",
162
+ "destructive": false,
163
+ "category": "GraphQL"
164
+ },
165
+ {
166
+ "id": "GQL-DEPTH-013",
167
+ "payload": "{\"query\": \"{ repository { forks { forks { forks { forks { forks { name } } } } } } }\"}",
168
+ "tags": [
169
+ "depth-limit",
170
+ "github-style"
171
+ ],
172
+ "expected_block": true,
173
+ "severity_hint": "High",
174
+ "notes": "Deep fork traversal (GitHub-style schema)",
175
+ "destructive": false,
176
+ "category": "GraphQL"
177
+ },
178
+ {
179
+ "id": "GQL-DEPTH-014",
180
+ "payload": "{\"query\": \"{ user { posts { comments { parent { parent { parent { parent { parent { id } } } } } } } } } }\"}",
181
+ "tags": [
182
+ "depth-limit",
183
+ "threaded"
184
+ ],
185
+ "expected_block": true,
186
+ "severity_hint": "Critical",
187
+ "notes": "Deep threaded comment parent traversal",
188
+ "destructive": false,
189
+ "category": "GraphQL"
190
+ },
191
+ {
192
+ "id": "GQL-DEPTH-015",
193
+ "payload": "{\"query\": \"query DeepQuery { a: user { b: friends { c: posts { d: comments { e: author { f: friends { g: posts { h: id } } } } } } } }\"}",
194
+ "tags": [
195
+ "depth-limit",
196
+ "mixed-relations",
197
+ "critical"
198
+ ],
199
+ "expected_block": true,
200
+ "severity_hint": "Critical",
201
+ "notes": "7-level deep query mixing different relation types with aliases",
202
+ "destructive": false,
203
+ "category": "GraphQL"
204
+ },
205
+ {
206
+ "id": "GQL-DEPTH-016",
207
+ "payload": "{\"query\": \"{ user { posts { comments { likes { user { posts { comments { id } } } } } } } }\"}",
208
+ "tags": [
209
+ "depth-limit",
210
+ "engagement"
211
+ ],
212
+ "expected_block": true,
213
+ "severity_hint": "Critical",
214
+ "notes": "Deep engagement chain (user->posts->comments->likes->user)",
215
+ "destructive": false,
216
+ "category": "GraphQL"
217
+ },
218
+ {
219
+ "id": "GQL-DEPTH-017",
220
+ "payload": "{\"query\": \"{ user @skip(if: false) { friends @skip(if: false) { friends @skip(if: false) { friends @skip(if: false) { friends { id } } } } } }\"}",
221
+ "tags": [
222
+ "depth-limit",
223
+ "directive-bypass"
224
+ ],
225
+ "expected_block": true,
226
+ "severity_hint": "High",
227
+ "notes": "Deep nesting with @skip directives (potential bypass attempt)",
228
+ "destructive": false,
229
+ "category": "GraphQL"
230
+ },
231
+ {
232
+ "id": "GQL-DEPTH-018",
233
+ "payload": "{\"query\": \"{ viewer { organization { repository { pullRequest { comments { author { organization { repository { id } } } } } } } } } }\"}",
234
+ "tags": [
235
+ "depth-limit",
236
+ "github-api"
237
+ ],
238
+ "expected_block": true,
239
+ "severity_hint": "Critical",
240
+ "notes": "Deep GitHub API-style nested query",
241
+ "destructive": false,
242
+ "category": "GraphQL"
243
+ },
244
+ {
245
+ "id": "GQL-DEPTH-019",
246
+ "payload": "{\"query\": \"{ user { posts(first: 1) { comments(first: 1) { replies(first: 1) { replies(first: 1) { replies(first: 1) { content } } } } } } }\"}",
247
+ "tags": [
248
+ "depth-limit",
249
+ "pagination-abuse"
250
+ ],
251
+ "expected_block": true,
252
+ "severity_hint": "High",
253
+ "notes": "Deep nesting with pagination arguments (still deep despite first: 1)",
254
+ "destructive": false,
255
+ "category": "GraphQL"
256
+ },
257
+ {
258
+ "id": "GQL-DEPTH-020",
259
+ "payload": "{\"query\": \"{ node(id: \\\"1\\\") { ... on User { friends { ... on User { friends { ... on User { friends { ... on User { friends { ... on User { id } } } } } } } } } } }\"}",
260
+ "tags": [
261
+ "depth-limit",
262
+ "polymorphic",
263
+ "critical"
264
+ ],
265
+ "expected_block": true,
266
+ "severity_hint": "Critical",
267
+ "notes": "5-level deep polymorphic inline fragment chain",
268
+ "destructive": false,
269
+ "category": "GraphQL"
270
+ }
271
+ ]