Skip to content

Resume state robustness: re-interrupt during preflight loses the resume point; input fingerprint misses zone/seeds/bundled wordlist/config #109

Closed

Description

@TMHSDigital

Why it matters

Resume is meant for long scans, where losing progress is most expensive. Two gaps make a resume either restart from zero or continue with silently different inputs.

Evidence

  1. Lost resume point. main_resume.go:188-191 copies Stats and RootDone only when res.done. A resumed scan interrupted during preflight or the wildcard probe never gets EventDone (internal/scan/runner.go:461,477). The new state then has RootDone=0 and empty Stats (results survive), so the next resume restarts from entry 0 and the first run's counts are lost.
  2. Incomplete fingerprint. inputDigests (main_resume.go:96-108) hashes only -w, -dL, -exclude-file and -r. It does not cover:
    • -simulate-zone, -seeds or -diff files;
    • the bundled wordlist, which changes on binary upgrade;
    • config/env defaults, which are re-applied at resume and can change -depth, -type, -exclude and so on.

Suggested approach

  • When !res.done, carry saved.RootDone and saved.Stats forward.
  • Store a hash of each target's built entries (this covers every wordlist source) plus the effective flag values, and refuse to resume on mismatch with a clear message.
  • Delete the state file once a resumed run finishes cleanly.

Done when

Tests cover a re-interrupt during preflight of a resumed run, plus a resume after the bundled wordlist or an env default changed (refused).

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