Open
Conversation
Add graph service datafetchers
This reverts commit 71ab332.
…, return an empty array" This reverts commit bb9af2d.
… or p2 license" This reverts commit d4e5d3b.
…p1 or p2 license)" This reverts commit 16b3312.
…tDataFetcher Both fetchers were only returning the first page of results. Added pagination loop using getOdataNextLink()/withUrl(). Also added Serializable and license header to IncidentDataFetcher to match AlertDataFetcher.
…ctor Adds SecureScoreDataFetcher and SecureScoreControlProfileDataFetcher using the Graph beta security().secureScores() and security().secureScoreControlProfiles() endpoints, both with pagination support.
New module for Microsoft Defender for Endpoint with four DataFetchers: DefenderMachineDataFetcher, DefenderAlertDataFetcher, DefenderVulnerabilityDataFetcher, DefenderRecommendationDataFetcher. Uses Java's built-in HttpClient with bearer token auth against the Defender for Endpoint API (api.securitycenter.microsoft.com). Supports OData nextLink pagination.
New module for Microsoft Sentinel (Security Insights) with three DataFetchers: SentinelIncidentDataFetcher, SentinelAlertRuleDataFetcher, SentinelDataConnectorDataFetcher. Uses azure-resourcemanager-securityinsights SDK (1.0.0). The SentinelClientAccessor interface requires tenantId, subscriptionId, resourceGroupName, workspaceName, and a SecurityInsightsManager. PagedIterable handles pagination automatically.
…tDataFetcher Covers the pagination fix (verifies all items are returned) and the Serializable addition to IncidentDataFetcher.
…aFetcher Includes JSON fixtures for two secure scores and two control profiles, factory methods in AzureTestObjects, and tests covering all-items return, tenant filtering, and Serializable verification.
DefenderQueryTest covers all four fetchers (machines, alerts, vulnerabilities, recommendations) with inline JSON test data. Tests verify full-collection return and field-based filtering.
Switched all three Sentinel fetchers from beansConvention to componentMethodConvention so ARM-style fluent methods (id(), name(), properties()) are correctly exposed as queryable columns. SentinelQueryTest covers incidents, alert rules, data connectors, and Serializable verification. SentinelTestObjects uses DefaultJsonReader to load IncidentInner/AlertRuleInner/DataConnectorInner from JSON fixtures.
Queries VM patch assessment results from the patchassessmentresources table using KQL, returning the latest assessment per VM with patch counts by classification (critical, security, other).
…, RoleAssignmentDataFetcher, RiskyUserDataFetcher - SecurityAssessmentDataFetcher: queries Defender for Cloud assessments via Azure Resource Graph (securityresources table), exposes statusCode and severity - RoleAssignmentDataFetcher: lists ARM role assignments at subscription scope via the authorization API, exposes principalId, principalType, roleDefinitionId - RiskyUserDataFetcher: fetches Identity Protection risky users via Graph beta API with OData pagination - ConditionalAccessPolicyDataFetcher: fixes pagination (was fetching only first page) and adds Serializable; convention context updated to break RiskyUser.getHistory() cycle - Fixes azure-resourcemanager-resourcegraph groupId/version (com.azure.resourcemanager:1.0.0) and updates API calls to match the 1.0.0 fluent style (withQuery/withSubscriptions/withSkipToken)
…attern Replaces flat record with AzureResourceWrapper<RoleAssignmentInner> so callers can query all SDK fields via payload.*, consistent with other ARM fetchers. ResourceGroupName is parsed from the role assignment resource ID. AzureResourceSecurityAssessment remains a record (no SDK model, Resource Graph JSON).
Clarifies that in multi-tenant setups one ResourceGraphClientAccessor must be configured per tenant, separate from AZURE_RESOURCE_MANAGER, because AzureResourceManager does not expose credentials for building a ResourceGraphManager.
…etworkSecurityGroupDataFetcher, fix ServicePlanDataFetcher to read CSV via getResourceAsStream - PostgreSqlFlexibleServer*DataFetchers: switch getAll() to findAll() so they return empty results instead of throwing PropertyNotFoundException when POSTGRESQL_MANAGER is not configured; add early return in PostgreSqlFlexibleServerWithParametersDataFetcher to skip PARAMETERS_TO_FETCH lookup when no managers are present - AzureResourceManagerSchemaProvider: register NetworkSecurityGroupDataFetcher - ServicePlanDataFetcher: replace Path.of(resource.toURI()) with getResourceAsStream() so the CSV can be read from inside a JAR
…/Graph data fetchers - Wire up AZURE_RESOURCE_MANAGER, RESOURCE_GRAPH_CLIENT, GRAPH_SERVICE_CLIENT, and POSTGRESQL_MANAGER configs; derive subscription ID dynamically from ARM - Register aliases and add test queries for all previously untested types: AzureDisk, AzureNetworkSecurityGroup, AzureResourceGroup, AzureSubscription, AzureTenant, AzureUserLastSignInActivity, AzureServicePlan, AzureSecureScore, AzureSecureScoreControlProfile
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.
This PR adds/extends data fetchers for:
It also fixes some issues with existing (paginated) queries