Skip to content

Commit 7c8cec7

Browse files
committed
Add flag to disable detections
1 parent df363c5 commit 7c8cec7

2 files changed

Lines changed: 12 additions & 2 deletions

File tree

graphqler/__main__.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,14 @@ def main(args: dict):
209209
config.DISABLE_MUTATIONS = True
210210
print("(P) Mutation fuzzing disabled — only Query chains will be generated")
211211

212+
# Apply detections CLI override
213+
if args.get('no_detections'):
214+
config.SKIP_INJECTION_ATTACKS = True
215+
config.SKIP_MISC_ATTACKS = True
216+
config.SKIP_DOS_ATTACKS = True
217+
config.SKIP_ENUMERATION_ATTACKS = True
218+
print("(P) All detections disabled")
219+
212220
# Apply ablation CLI overrides
213221
if args.get('no_objects_bucket'):
214222
config.USE_OBJECTS_BUCKET = False
@@ -325,6 +333,7 @@ def main(args: dict):
325333
parser.add_argument("--llm-base-url", help="custom base URL for LLM endpoint (required for Ollama and LiteLLM proxies)", required=False)
326334
parser.add_argument("--llm-max-retries", help="number of retries when LLM returns non-JSON (default: 2)", type=int, required=False)
327335
parser.add_argument("--disable-mutations", help="only generate and run Query chains — all Mutation nodes are excluded from fuzzing", action="store_true", default=False)
336+
parser.add_argument("--no-detections", help="disable all vulnerability detections (injection, misc, DoS, enumeration, API-level checks)", action="store_true", default=False)
328337

329338
# Ablation / research flags
330339
parser.add_argument("--no-objects-bucket", help="ablation: disable the objects bucket — requests carry no state from prior responses", action="store_true", default=False)

graphqler/fuzzer/fuzzer.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -292,8 +292,9 @@ def _refresh_progress():
292292

293293
# Detections
294294
self.stats.phase = "detections"
295-
self.dengine.run_detections_on_api()
296-
self.logger.info("Completed running detections on the overall API")
295+
if not (config.SKIP_INJECTION_ATTACKS and config.SKIP_MISC_ATTACKS and config.SKIP_DOS_ATTACKS and config.SKIP_ENUMERATION_ATTACKS):
296+
self.dengine.run_detections_on_api()
297+
self.logger.info("Completed running detections on the overall API")
297298

298299
# LLM report (opt-in via config.LLM_ENABLE_REPORTER)
299300
if config.LLM_ENABLE_REPORTER:

0 commit comments

Comments
 (0)