-
Notifications
You must be signed in to change notification settings - Fork 249
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add assessment check for MS.DEFENDER.6.2v1 #1241
Merged
nanda-katikaneni
merged 10 commits into
main
from
88-update-purview-premium-assesment-to-check-status-for-all-users
Aug 1, 2024
Merged
Add assessment check for MS.DEFENDER.6.2v1 #1241
nanda-katikaneni
merged 10 commits into
main
from
88-update-purview-premium-assesment-to-check-status-for-all-users
Aug 1, 2024
Conversation
This file contains 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
schrolla
added
the
enhancement
This issue or pull request will add new or improve existing functionality
label
Jul 29, 2024
schrolla
force-pushed
the
88-update-purview-premium-assesment-to-check-status-for-all-users
branch
from
July 29, 2024 21:48
6ae71b8
to
6c00071
Compare
schrolla
force-pushed
the
88-update-purview-premium-assesment-to-check-status-for-all-users
branch
2 times, most recently
from
August 1, 2024 14:19
77fd01d
to
f564a45
Compare
dagarwal-mitre
approved these changes
Aug 1, 2024
james-garriss
approved these changes
Aug 1, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done. Nice job.
* Add MSGraph connection for Defender provider
Update Connect-Tenant tests to mock Connect-GraphHelper instead of Connect-MgGraph
schrolla
force-pushed
the
88-update-purview-premium-assesment-to-check-status-for-all-users
branch
from
August 1, 2024 18:06
edc6c60
to
694d91d
Compare
@nanda-katikaneni Resolved merge conflicts from Regal PR test renaming (in favor of that PRs naming convention) and tests are green. Ready for merge. |
nanda-katikaneni
deleted the
88-update-purview-premium-assesment-to-check-status-for-all-users
branch
August 1, 2024 19:38
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.
🗣 Description
Provides enhancement to Defender assessment checks for MS.DEFENDER.6.2v1 to ensure ALL users are assigned an advanced auditing license feature to support the SCB policy item. The actual update includes:
Connect-GraphHelper
to modularize connecting to Graph APIConnect-GraphHelper
functiontotal_users_without_advanced_audit
countNo documentation updates are required as AAD and Defender already used the same permissions (Global Reader) and only an existing scope is required for Defender provider MSGraph calls (User.Read.All).
💭 Motivation and context
MS.DEFENDER.6.2v1 was previously set to not be checked due to a lack of a direct mechanism to do so under Defender. The new approach uses MSGraph to get license information which now provides ScubaGear users with assessment results for the policy item rather than requiring a full manual check as before. This makes assessing MS.DEFENDER.6.2v1 easier for users.
Closes #88
🧪 Testing
Testing the compliant case may be difficult if a test tenant with enough licenses to cover all users is not available. Invoke-ScubaRunCached with modified results is recommended for that case while setting the
total_users_without_advanced_audit
value to zero or -1. The functional tests do this as well, so running the Defender functional tests will also exercise the code.To test the failed case, test on a tenant after making sure at least one user is not assigned the proper license.
Invoke-Scuba -p defender
Since changes were also make to Connection, test should include checking:
Note: This last one exercises the different connection cases and paths where MSGraph is enabled.
📷 Screenshots (if appropriate)
Example of MS.DEFENDER.6.2v1 results when not all users are assigned the advanced audit license:
✅ Pre-approval checklist
✅ Pre-merge checklist
PR passed smoke test check.
Feature branch has been rebased against changes from parent branch, as needed
Use
Rebase branch
button below or use this reference to rebase from the command line.Resolved all merge conflicts on branch
Notified merge coordinator that PR is ready for merge via comment mention
✅ Post-merge checklist