-
Notifications
You must be signed in to change notification settings - Fork 0
release: v0.9.0 #55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
LegendEvent
wants to merge
7
commits into
main
Choose a base branch
from
release/v0.9.0
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
release: v0.9.0 #55
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
a38f57e
Security: Enable SSL certificate verification by default (#48)
LegendEvent 187e431
feat: add configurable request timeout support (#49)
LegendEvent d42c1a4
feat: add reliability improvements and error handling enhancements (#51)
LegendEvent fbc28a6
release: v0.9.0
LegendEvent a076e4d
fix: address Copilot review comments
LegendEvent 5ff2392
fix: handle 400 error in test_summarystatistics_basic
LegendEvent f8726a6
fix: improve connection validation in test fixture
LegendEvent File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,21 @@ | ||
| # API Guide PDF (for reference only, not to be committed) | ||
| *.pdf:Zone.Identifier | ||
|
|
||
| # AI agent knowledge base files | ||
| AGENTS.md | ||
|
|
||
| # Certificates | ||
| *.crt | ||
| *.pem | ||
| *.cer | ||
| *.pfx | ||
|
|
||
| # Python | ||
| __pycache__/ | ||
| *.pyc | ||
| *.pyo | ||
| .eggs/ | ||
| *.egg-info/ | ||
| dist/ | ||
| build/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,52 @@ | ||
| # Changelog | ||
|
|
||
| All notable changes to the Darktrace SDK will be documented in this file. | ||
|
|
||
| The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), | ||
| and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). | ||
|
|
||
| ## [0.9.0] - 2026-02-27 | ||
|
|
||
| ### Added | ||
| - **Connection Pooling**: Added `requests.Session()` for improved performance with multiple requests (4x faster on reused connections) | ||
| - **Context Manager Support**: `DarktraceClient` now supports `with` statement for proper resource cleanup | ||
| ```python | ||
| with DarktraceClient(host, public_token, private_token) as client: | ||
| client.devices.get() | ||
| ``` | ||
| - **Automatic Retry Logic**: Transient failures (5xx, 429, connection errors) are automatically retried | ||
| - Max 3 retries with 10 second wait between attempts | ||
| - Client errors (4xx) are NOT retried | ||
| - **SSRF Protection**: URL scheme validation blocks dangerous schemes (`file://`, `ftp://`, `data://`, `javascript://`) | ||
| - Note: Private IPs are explicitly ALLOWED for enterprise baremetal deployments | ||
| - **`_safe_json()` Helper**: Added to `BaseEndpoint` for JSON parsing with proper error handling | ||
| - **Configurable Request Timeout**: Added `timeout` parameter to `DarktraceClient` (default: None, uses requests default) | ||
| - **Compilation Test**: Added `tests/test_compilation.py` for full SDK validation without network calls | ||
| - **Read-Only Test**: Added `tests/test_sdk_readonly.py` for comprehensive testing against real Darktrace instances | ||
| - **CHANGELOG.md**: This changelog file | ||
|
|
||
| ### Changed | ||
| - **SSL Verification Default**: Changed from `False` to `True` for security (verify_ssl=True by default) | ||
| - **Error Handling in ModelBreaches**: Methods now re-raise exceptions instead of returning `{"error": str}` dicts | ||
| - `add_comment()`, `acknowledge()`, `unacknowledge()` now properly propagate exceptions | ||
| - **IntelFeed Parameter**: Fixed `fulldetails` parameter name (was incorrectly documented as `full_details` in examples) | ||
| - **Cleaned Up Imports**: Removed unused `timedelta` import from `auth.py` | ||
| - **Translated Comments**: German comments translated to English | ||
| - **Documentation Updated**: Added v0.9.0 features to README.md and docs/README.md | ||
|
|
||
| ### Fixed | ||
| - IntelFeed `get_with_details()` now correctly passes `fulldetails=True` to `get()` | ||
| - Examples and tests updated to use correct `fulldetails` parameter | ||
|
|
||
| ### Security | ||
| - SSL certificate verification is now enabled by default | ||
| - URL scheme validation prevents SSRF attacks via non-HTTP schemes | ||
|
|
||
| ### Removed | ||
| - Mocked test file `tests/test_devicesearch.py` (replaced by compilation + readonly tests) | ||
|
|
||
| --- | ||
|
|
||
| ## [0.8.55] - Previous Release | ||
|
|
||
| Initial stable release with 28 endpoint modules. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| # Version information for darktrace-sdk | ||
| # This is the single source of truth for version information | ||
| # after that the script update_version.py needs to be run | ||
| __version__ = "0.8.55" | ||
| __version__ = "0.9.0" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The conftest.py change references a
--no-verifyoption that doesn't exist in thepytest_addoptionfunction. The code checks forconfig.getoption('no_verify', default=False)but this option is never registered. This will cause the code to always use the default value of False, effectively never suppressing SSL warnings. Either add the option registration inpytest_addoption, or remove this conditional logic.