Skip to content

feat: expose the Windows V2 score scale and network availability - #7

Merged
batuhanisildak-malwation merged 4 commits into
mainfrom
feat/windows-v2-score-scale
Oct 15, 2026
Merged

batuhanisildak-malwation merged 4 commits into
mainfrom
feat/windows-v2-score-scale

Conversation

@batuhanisildak-malwation

Copy link
Copy Markdown
Contributor

Windows V2 score scale and network availability types

Branch: feat/windows-v2-score-scale into main (repository threatzone-python-sdk).
Companion to the platform PR feat/windows-v2-scoring-platform (Windows V2 report cutover).

Summary

The platform adds Windows V2 fields to the public REST API. This PR adds the same fields to the SDK types.
Each new field is optional. An older server omits it, and the SDK gives None.

Changes

Commit Change
af375ca Indicator.score_maximum (scoreMaximum): the scale of Indicator.score. It is 10 for legacy reports and 100 for Windows V2 reports. New model NetworkAvailability (state, reason, coverage). NetworkSummary adds counts_available, availability and source_scope. DnsQuery, HttpRequest, Connection and NetworkThreat add source_scope.
2bf930e Forward compatibility. The enum-like types (NetworkAvailabilityState, NetworkCoverage, NetworkSourceScope) are Literal[...] | str, and score_maximum is int | None. A new server value does not fail the call.
b184adb SummaryNetwork (OverviewSummary.network) adds counts_available, availability and source_scope.

The package exports NetworkAvailability, NetworkAvailabilityState, NetworkCoverage and NetworkSourceScope.
CHANGELOG.md and docs/TYPES.md describe the fields.
The X-Network-Evidence-Availability header of the list endpoints is not exposed, because the list methods return plain lists. Use get_network_summary().availability.

Size: 3 commits, 7 files, +226 / -7.

Compatibility

  • All changes are additive. Existing fields and methods do not change.
  • Legacy reports send counts_available=True, availability=None and source_scope=None.
  • A client with this version works with an older server: each new field is None.

Test evidence

  • pytest: 666 passed.
  • mypy src: no issues in 33 source files.
  • ruff check .: all checks passed. ruff format --check src/ tests/ (the CI scope): 64 files already formatted.

@batuhanisildak-malwation
batuhanisildak-malwation marked this pull request as ready for review October 3, 2026 12:39
@batuhanisildak-malwation
batuhanisildak-malwation merged commit 3b44bd7 into main Oct 15, 2026
7 checks passed
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