Skip to content

Resume gives a fresh -max-queries budget, so interrupt+resume cycles exceed the query cap #108

Closed

Description

@TMHSDigital

Why it matters

-max-queries is a rules-of-engagement budget, the kind written into a bug-bounty or pentest scope. Each interrupt-and-resume can exceed it by up to the full cap again.

Evidence

  • The dispatcher's admitted counter starts at 0 (internal/scan/runner.go:586), and nothing subtracts the saved run's lookups.
  • Repro: a state with RootDone=900 and -max-queries 1000 ended with processed:1900.

Suggested approach

On resume, pass the remaining budget (MaxQueries - saved queries) into the engine. Count wire queries if the cap is in queries (#32/#50 semantics). If the budget is already spent, say so and exit.

Done when

A test shows that interrupt plus resume never exceeds -max-queries in total.

Activity

  1. added
    bug
    priority: medium
    area: scan
    on Oct 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: scanbugpriority: medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions