feat(qradar): add IBM QRadar collector (#253)#425
Open
SamuelHassine wants to merge 2 commits into
Open
Conversation
Detection-expectation collector that runs Ariel (AQL) searches against IBM QRadar to validate detections. Modeled on the splunk-es/elastic collector pattern (pyoaev CollectorDaemon, expectation and trace services). Supports authorized service token (SEC header) or basic auth, source/destination IP and parent-process (URL) matching, and retry with configurable offset. Registered in the CircleCI docker build/publish pipeline.
- Remove the dead QRadarAlert._raw PrivateAttr: it was assigned through the constructor (QRadarAlert(..., _raw=row)), which Pydantic v2 ignores, so it always stayed None and was never read anywhere. - Correct the _build_trace_url_from_expectation docstring to describe the actual behavior: it builds a QRadar Log Activity filter from source/destination IPs only, not the full AQL query (no parent-process URL match, no search time window). Rename the misleading kql_* locals to filter_* since QRadar uses AQL, not KQL. - Fix the README configuration section: the loader selects a single source (first of .env, config.yml, environment variables); it does not merge env vars over YAML over defaults. - Fix the documented default collector name (QRadar, not IBM QRadar) to match ConfigLoaderCollector.
Member
Author
Review and fix summaryCopilot errored out and could not review this PR, so I did a full independent senior review of the QRadar collector (which shares the framework with
Reviewed and considered acceptable (no change):
Status:
|
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
Adds an OpenAEV collector for IBM QRadar (requested in #253). It validates OpenAEV detection expectations by running Ariel (AQL) searches against QRadar for events that match the attack signatures produced during a simulation, then reports a verdict and a trace linking back to the QRadar Log Activity view.
Modeled on the existing
splunk-es/elasticSIEM collector pattern (pyoaev CollectorDaemon plus expectation/trace service providers), with the SIEM-specific layer implemented for QRadar.What it does
SECheader, preferred) or HTTP basicsourceip,destinationip, and parent process via theURLproperty, bounded by the expectation time windowAPI endpoints
POST /api/ariel/searches?query_expression=<AQL>(create search)GET /api/ariel/searches/{search_id}(poll status)GET /api/ariel/searches/{search_id}/results(fetch results)Self-review fixes
Copilot could not review this PR (it errored out), so these come from a manual pass over the full collector:
QRadarAlert._rawPrivateAttr: it was passed through the constructor (which Pydantic v2 ignores) so it was alwaysNoneand never read._build_trace_url_from_expectationdocstring to match the actual behavior (a Log Activity filter from source/destination IPs only, not the full AQL query) and renamed the misleadingkql_*locals tofilter_*since QRadar uses AQL..env,config.yml, environment variables); it does not merge them.QRadar, notIBM QRadar) to matchConfigLoaderCollector.Tests
.circleci/config.yml(docker build + publish)Notes
src/img/qradar-logo.png) is a placeholder and should be replaced with the official IBM QRadar logo before release.Closes #253