Skip to content

Adds On-demand scope API for active scanning - #29

Open
sebdraven wants to merge 12 commits into
masterfrom
feat/ondemand-scan
Open

sebdraven wants to merge 12 commits into
masterfrom
feat/ondemand-scan

Conversation

@sebdraven

Copy link
Copy Markdown
Collaborator

Adds support for ONYPHE's On-demand scope API, letting users actively scan an IP, CIDR or domain (single or bulk) instead of only reading previously collected data.

  • Adds ondemand_scope_ip, ondemand_scope_domain, ondemand_scope_ip_bulk, ondemand_scope_domain_bulk and ondemand_scope_result to both Onyphe and AsyncOnyphe, sharing optional import_results, vulnscan, urlscan, ports and maxscantime tuning
  • Marks the bulk endpoints as living under ONYPHE's unstable /dev/ prefix, and the domain single endpoint as an undocumented, by-analogy path, each isolated behind a single constant so a future fix is a one-line change
  • Prevents accidental double scans: send() gains a retry: bool flag so launches (POST) are never retried on 429/5xx/transport errors, while result retrieval (GET) keeps the usual retry behaviour
  • Introduces ScanInProgressError (subclassing APIError, carrying .scan_id) to distinguish a still-running scan (ONYPHE codes 103/111) from an actual failure, regardless of the HTTP status carrying it
  • Adds pyonyphe ondemand ip|domain|ip-bulk|domain-bulk|result CLI commands, with bulk commands reading targets from a file and ondemand result exiting with code 3 while the scan is still in progress
  • Documents the new API and exception across the README, CLI, API and usage docs, and adds test coverage for specs, both clients and the CLI

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant