⭐ v13: Convert Azure Defender dict values into resources#6694
Merged
Conversation
444a335 to
01768f0
Compare
Contributor
Test Results5 221 tests 5 217 ✅ 2m 3s ⏱️ Results for commit 3156644. ♻️ This comment has been updated with latest results. |
3b17050 to
27b02d2
Compare
|
Unable to complete the code review. Please try again or reduce the PR size. |
Superseded by new review
Replace all 10 untyped dict-returning defenderFor* fields with fully typed MQL resources, matching the existing defenderForApis and defenderCSPM pattern. Each resource exposes .enabled, .pricingTier, and common pricing metadata (subPlan, enforce, deprecated, freeTrialRemainingTime, enablementTime, inherited, inheritedFrom, replacedBy, resourcesCoverageStatus). Add typed extension sub-resources for both defenderCSPM and defenderForContainers with name, isEnabled, additionalProperties, operationStatusCode, and operationStatusMessage fields. Add isEnabled and phone fields to securityContact. Add unit tests for commonPricingArgs and argsFromContactProperties helper functions. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add comments to both DefenderCSPM and DefenderForContainers extensions() methods explaining the intentional re-fetch of pricing data for lazy loading. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The extensions field was defined as a plain field instead of a computed field (missing `()`), so the hand-written extensions() method was never called. This matches the working defenderCSPM pattern. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add nil check for props parameter to prevent panic if Properties is nil - Simplify enablementTime assignment since llx.TimeDataPtr already handles nil - Remove unused time import - Add NilProperties test case for commonPricingArgs Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Prevent nil-pointer panics when cloudPosturePricing.Properties or containersPricing.Properties is nil in the CSPM and Containers extensions() methods. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Use "/extension/" (singular) in buildExtensionResources to maintain backward compatibility with the pre-existing CSPM extension cache keys. Simplify the nil-props guard in commonPricingArgs by substituting an empty PricingProperties struct, so all nil-safe field checks handle it uniformly without duplicating zero-value assignments. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
f4809f3 to
3156644
Compare
3 tasks
arlimus
approved these changes
Mar 2, 2026
Member
arlimus
left a comment
There was a problem hiding this comment.
super helpful for all named fields in here
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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 improves how these work on the shell and give LLMs the information they need to write these queries.
Note: This is a breaking change and will require updating our policies at the same time.
Closes #4499