fix(sdk): accept AuditEvent key vault diagnostics#11660
Conversation
- Recognize explicit AuditEvent diagnostic log categories for Azure Key Vaults - Preserve existing audit and allLogs category-group behavior - Add regression coverage for category-based Key Vault diagnostic settings
- Add unreleased SDK changelog entry for AuditEvent diagnostic support
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (4)
📝 WalkthroughWalkthroughThe Changeskeyvault_logging_enabled AuditEvent Compliance Fix
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Suggested reviewers
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
✅ Conflict Markers Resolved All conflict markers have been successfully resolved in this pull request. |
Codecov Report✅ All modified and coverable lines are covered by tests.
Additional details and impacted files@@ Coverage Diff @@
## master #11660 +/- ##
==========================================
- Coverage 94.10% 87.88% -6.22%
==========================================
Files 247 237 -10
Lines 36421 6200 -30221
==========================================
- Hits 34274 5449 -28825
+ Misses 2147 751 -1396
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
Context
Fixes #11656
Azure Key Vault diagnostic settings can represent audit logging as an explicit
AuditEventlog category withcategoryGroup: null. In that state, Key Vault audit logging is materially enabled, butkeyvault_logging_enabledonly evaluated category groups and reported the vault as failing.From a compliance standpoint, this check should evaluate the control objective: Key Vault audit logging is enabled and routed to a supported destination. It should not fail solely because Azure returned the category-based diagnostic setting representation instead of category groups. A false failure makes the result difficult to trust for teams consuming Prowler OCSF output directly.
Description
This PR updates
keyvault_logging_enabledto pass when a diagnostic setting has either:category == "AuditEvent"andenabled == true, orauditandallLogsenabledThe existing category-group behavior is preserved. The metadata and remediation text now describe both supported representations, and a regression test covers the observed Azure ARM shape with
AuditEventenabled andAzurePolicyEvaluationDetailsdisabled.Steps to review
AuditEventcategory-based diagnostic settings.Checklist
Community Checklist
SDK/CLI
UI
API
License
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
Summary by CodeRabbit
Bug Fixes
Documentation