feat: add cortex_xdr adapter for Palo Alto Cortex XDR REST API#274
Draft
maximelb wants to merge 1 commit into
Draft
feat: add cortex_xdr adapter for Palo Alto Cortex XDR REST API#274maximelb wants to merge 1 commit into
maximelb wants to merge 1 commit into
Conversation
Pulls incidents and alerts from the Cortex XDR public_api. Supports both standard and advanced (nonce + sha256) API key authentication, per-data-type fetch goroutines with creation_time high-water marking, search_from/search_to paging, and 429 retry handling. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
cortex_xdradapter that pulls incidents and alerts from the Palo Alto Cortex XDR REST API.api_key + nonce + timestamp_mswith SHA-256 and addsx-xdr-nonce/x-xdr-timestampheaders, per Palo Alto's spec).search_from/search_to(100/page), sorted ascending oncreation_timeso a per-stream high-water mark advances monotonically and avoids re-shipping. 429s retry once after 60s; 10 consecutive failures stop the adapter.Configuration
api_key_idapi_keyapi_urlhttps://api-<tenant>.xdr.us.paloaltonetworks.comauth_typeadvancedadvancedorstandarddata_typesincidents,alertsincidents,alertsstart_timetime_between_requests1mEndpoints called:
POST /public_api/v1/incidents/get_incidents/POST /public_api/v1/alerts/get_alerts_multi_events/Test plan
go build ./containers/generalsucceeds locally (verified)data_types=incidentsanddata_types=alertseach work in isolation🤖 Generated with Claude Code