Commit Graph
99 Commits
Author SHA1 Message Date
L1ghtn1ng 55c83df0ef fix(api): harden run worker recovery, child exit codes, and run-now errors
- _child_execute now returns an exit code and the module entry maps it
  to the process status, so a child terminated by an external signal
  exits nonzero; the parent records the run as failed with the partial
  checkpoint attached instead of mistaking leftover evidence for
  terminal completion
- recover_orphans isolates each orphaned run: one unreadable checkpoint
  (schema-passing but structurally broken) no longer aborts recovery of
  the remaining runs or crashes every future startup - the affected run
  is failed without evidence and recovery continues
- _process_output drains child streams to EOF but retains only a
  bounded tail, so a verbose child cannot grow API memory unboundedly
- the execution poll reads the lifecycle row instead of the full detail
  projection every 50 ms
- run-now maps a stale stored run template to a sanitized 503 instead
  of leaking a raw pydantic ValidationError as a 500
2026-09-17 02:05:21 +01:00
L1ghtn1ng 90e5fd9119 fix(dns): skip wordlist labels that validation would reject
A label such as _dmarc passes the recursive-DNS label normalizer (which
allows underscores) but is rejected by the shared hostname normalizer
inside validate_dns_candidates, whose empty result then crashed the
whole dns-recursive action with an unhandled ValueError from the strict
tuple unpack. Check the candidate with the same normalize_scoped_hostname
helper before querying and skip it, so one unusable wordlist entry no
longer aborts the action.
2026-09-17 01:55:53 +01:00
L1ghtn1ng 0d2bbb9662 fix(core): correct shared transport ssl, header, and body handling
- _create_connector: an explicit ssl=False (verification disabled) was
  silently replaced with a verifying context by 'ssl_context or default';
  only an unset context now falls back to the certifi default
- fetch/post_fetch/fetch_all: caller-supplied headers were silently
  dropped when a caller-owned session was passed; they are now forwarded
  per request, matching _open_get_response and aiohttp merge semantics
  (sessions that bake the same headers are unaffected)
- fetch: a borrowed session with default verification no longer rebuilds
  a certifi SSL context on every request; it defers to the connector
  context the session already owns
- _normalize_data: the post_fetch data='' default raised JSONDecodeError
  internally and silently returned without sending any request; empty
  bodies now send, and non-JSON strings pass through as raw bodies

Traced every owned-versus-borrowed branch; all post_fetch callers pass
json_body or valid JSON strings, and the only verify=False caller
(api_endpoints) supplies its own connector.
2026-09-17 01:51:15 +01:00
NotoriousRebel ea5db87915 Merge master into dev to resolve PR #2607 conflicts
Preserve provider outcome release notes alongside the HTTP proxy wording. Keep the dev domain glossary and carry the master HTTP-only proxy policy into its relocated architecture guide. Retain RocketReach cancellation coverage while removing the obsolete global dependency stub.

Align provider lifecycle regressions with the master session-construction boundary: construction ValueError is normalized to transport-error, while cancellation, lifecycle RuntimeError, and teardown ValueError still propagate.
2026-09-09 21:41:46 -04:00
MattandGitHub 3b01d7f172 feat: clarify saved-run reporting before 5.0 (#2599)
Provide harvest-report targets, contributions, and hostname-changes with consistent saved-evidence terminology across the CLI, REST API, and HarvestView. Preserve target scope, source-outcome handling, JSONL, and the stored evidence schema.

Update onboarding and operator documentation, keep the domain glossary in CONTEXT.md, record behavior rules in docs/architecture.md, and consolidate release preparation in CONTRIBUTING.md.

Validation: all eight GitHub checks passed at ed54542a; focused reporting and documentation checks passed. Tracks https://github.com/NotoriousRebel/theHarvester/issues/349.
2026-09-07 16:48:20 -04:00
MattandGitHub e8bab9ebcc refactor: centralize target identity semantics (#2597)
* refactor: own enumeration target identity

* refactor: clarify target identity policies
2026-09-04 18:02:48 -04:00
NotoriousRebel 0756ffc049 fix: fail closed on unreliable tracking baselines 2026-08-29 17:21:53 -04:00
NotoriousRebel 6b7852f7ef feat: track hostname changes across runs 2026-08-29 16:38:25 -04:00
NotoriousRebel 2440b2b932 refactor: own API runtime state in app lifespan 2026-08-27 15:42:00 -04:00
NotoriousRebel 8ead90f7a9 fix: scope proxy mode to HTTP transport 2026-08-26 22:53:21 -04:00
NotoriousRebel 0e4324f2cb fix: centralize discovery transport handling 2026-08-26 18:38:56 -04:00
NotoriousRebel 227d189d7e fix: reuse proxied routeviews session 2026-08-26 16:31:46 -04:00
NotoriousRebel 74282f279b fix: preserve proxy transport failures across tasks 2026-08-26 16:27:29 -04:00
NotoriousRebel ad28a87111 fix: reject direct DNS in proxy mode 2026-08-26 16:17:51 -04:00
NotoriousRebel 22dc7b4cfd refactor: remove confirmed dead code 2026-08-26 10:58:40 -04:00
NotoriousRebel 8889ddca9c fix: pin proxy identity per execution 2026-08-26 00:38:46 -04:00
NotoriousRebel 50669f2704 docs: align fail-closed proxy contract 2026-08-25 23:11:03 -04:00
NotoriousRebel 414276e330 fix: fail closed when required proxies are unavailable 2026-08-25 22:59:06 -04:00
L1ghtn1ng f2efcb5b99 fix: canonicalize hostname scope and IP results in one helper
Put IDNA and label validation in normalize_scoped_hostname so the
runner, parser, and storage path share one authorized-target boundary.
Drop IPv6 zone identifiers at collection instead of failing finish(),
and remove leftover BuiltWith and Shodan aliases now that www. is part
of the explicit target.
2026-08-25 02:02:35 +01:00
L1ghtn1ng 86c2c5f979 fix: enforce discovery security boundaries
Keep proxy identities stable across provider conversations, preserve exact target scope, canonicalize evidence, secure first-run config creation, and retain legacy source-name compatibility.
2026-08-25 01:29:05 +01:00
NotoriousRebel c3ec07b593 Clarify partial source outcomes 2026-08-23 18:00:26 -04:00
NotoriousRebel 5c74e1a03d Allow uncapped discovery and report source yield 2026-08-23 17:24:08 -04:00
NotoriousRebel 2c6c5bff4a refactor: use SQLAlchemy for HarvestView schedules 2026-08-20 16:01:55 -04:00
NotoriousRebel d875f3ac21 fix: recover persisted run evidence idempotently 2026-08-20 12:28:30 -04:00
NotoriousRebel 8bdbca217c feat: extend HarvestView schedule management 2026-08-20 11:11:25 -04:00
NotoriousRebel ca1cb72ec6 fix: reconcile superseded schedule reservations 2026-08-20 10:02:40 -04:00
NotoriousRebel a1d794d5af feat: add persistent HarvestView scheduling 2026-08-20 01:21:09 -04:00
NotoriousRebel 9b982db7b6 fix: report provider collection outcomes truthfully 2026-08-16 21:31:08 -04:00
NotoriousRebel c91456531c feat: export completed runs as SQLite 2026-08-16 14:41:19 -04:00
NotoriousRebel de60af1f17 fix: reject removed adapter lifecycle state 2026-08-16 00:49:16 -04:00
NotoriousRebel 2ac59f3a38 refactor: centralize source execution lifecycle 2026-08-16 00:32:22 -04:00
NotoriousRebel 6e0e761661 fix: close provider contract review gaps 2026-08-15 22:28:14 -04:00
NotoriousRebel c1101ca73a test: harden provider contracts and offline coverage 2026-08-15 21:26:35 -04:00
NotoriousRebel df1933b345 fix: preserve provider sessions across pagination 2026-08-15 13:20:26 -04:00
NotoriousRebel ef212e135f Merge remote-tracking branch 'upstream/dev' into codex/upstream-harvestview-impeccable
# Conflicts:
#	CHANGELOG.md
2026-08-15 11:56:04 -04:00
MattandGitHub 01f5561284 Merge pull request #2545 from NotoriousRebel/codex/upstream-takeover-evidence
Replace takeover fingerprints with typed DNS-first evidence
2026-08-15 11:52:11 -04:00
NotoriousRebel bbc7832c8f fix: reuse bounded takeover transport 2026-08-15 11:44:18 -04:00
NotoriousRebel 2691f0d258 fix: make HarvestView source readiness actionable 2026-08-15 11:43:32 -04:00
NotoriousRebel 4bcf2ceae9 fix: restore conservative source-worker default 2026-08-15 11:41:06 -04:00
NotoriousRebel ea9dab4b87 feat: replace takeover fingerprints with typed evidence 2026-08-15 03:30:33 -04:00
MattandGitHub f44807a046 refactor: run discovery sources with TaskGroup (#2544)
* refactor: run discovery sources with TaskGroup

* fix: preserve source runner compatibility diagnostics

* feat: add configurable source workers
2026-08-15 01:48:33 -04:00
MattandGitHub 4fef2c5e3b refactor: bound screenshot lifecycle ownership (#2543)
* refactor: bound screenshot lifecycle ownership (#293)

* fix: retain HTTP error screenshots (#293)
2026-08-14 23:10:34 -04:00
MattandGitHub 38e32de023 fix: complete API endpoint scans by default (#2539)
* fix: complete API endpoint scans by default

* refactor: reuse shared cancellation cleanup
2026-08-14 23:03:28 -04:00
MattandGitHub 1a9b114a5d fix: complete DNS enumeration by default (#2542)
* fix: complete DNS enumeration by default

* test: avoid URL substring sanitizer alert
2026-08-14 22:54:25 -04:00
MattandGitHub bb77613a05 fix: call Censys Platform API directly (#2537)
* fix: call Censys Platform API directly (#295)

(cherry picked from commit 7ce361413ad35471ab0b6878382f3548b0918dbe)

* docs: clarify Censys global search entitlement
2026-08-14 22:44:45 -04:00
MattandGitHub b8a8f7c7ca fix: move Shodan discovery into adapter (#2535)
* fix: move Shodan discovery into adapter (#283)

* docs: clarify Shodan transport and persistence

* fix: query every Shodan-resolved IPv4

* fix: call Shodan Host API directly

* fix: serve HarvestView assets locally

* Revert "fix: serve HarvestView assets locally"

This reverts commit 413e8b25ab.

* docs: clarify Shodan proxy transport

* docs: clarify Shodan changelog entry

* feat: persist structured Shodan host evidence

* feat: expand Shodan discovery with TLS search
2026-08-14 21:11:12 -04:00
MattandGitHub 259455f1c1 fix: remove Windvane DNS guessing fallback (#2541) 2026-08-14 15:14:53 -04:00
MattandGitHub 7c4420150d Add route-aware no-host result filtering (#2534) 2026-08-13 11:14:55 -04:00
MattandGitHub 624066a3e8 Add RouteViews enrichment and sourced ASN organization attribution (#2528)
* Add RouteViews network enrichment

* Add authenticated RouteViews API access

* Restrict RouteViews to explicit network pivots

* Restore discovered ASN RouteViews enrichment

* Retain sourced ASN organization attribution

* Avoid dangling and repeated ASN attributions

* Keep automatic RouteViews evidence target-relevant

* Complete target-relevant RouteViews enrichment

* Clarify automatic RouteViews IP pivots
2026-08-13 10:46:54 -04:00
MattandGitHub 1db27309dd Remove duplicate Chaos discovery source (#2533) 2026-08-12 18:47:34 -04:00