Batch set Windows MDM profile activities have null details (missing profile names)
Goal
| User story |
|---|
| As an IT admin reviewing the activity audit log, |
I want to see which Windows MDM profiles were added/modified/removed when batch set operations are performed via fleetctl or GitOps |
| so that I can maintain a complete and trustworthy audit trail of security profile changes and detect any unauthorized modifications. |
Changes
When batch set operations (e.g., uploading multiple Windows MDM profiles via fleetctl/GitOps, or deleting all profiles via an empty batch set) generate edited_windows_profile activities, the details field is null—no profile names are included. Individual profile operations (create, delete, resend) correctly include the profile name. This creates an incomplete audit trail: a malicious insider could use the batch set endpoint to modify a security profile (e.g., weaken password requirements, disable firewall enforcement) and the activity log would only show "Windows profiles were edited for Team Alpha" with no indication of which profile was changed.
The goal is to include which profiles were added, modified, or removed in the edited_windows_profile activity details for batch set operations.
Product
- [x] UI changes: The activity feed already handles
profile_nameinedited_windows_profileactivities viagetEditedProfileMessage. Extend existing activity to render the new batch details. - [x] CLI (fleetctl) usage changes: No changes
- [x] YAML changes: No changes
- [x] REST API changes: No changes
GET /api/v1/fleet/activitiesendpoint response will now include richerdetailsforedited_windows_profileactivities from batch set operations, but the endpoint signature is unchanged.
- [x] Fleet's agent (fleetd) changes: No changes
- [x] Fleet server configuration changes: No changes
- [x] Exposed, public API endpoint changes: No changes
- [x] fleetdm.com changes: No changes
- [x] GitOps mode UI changes: No changes
- [x] GitOps generation changes: No changes
- [x] Activity changes: https://github.com/fleetdm/fleet/pull/51011
- [x] Permissions changes: No changes
- [x] Changes to paid features or tiers: No changes
- [x] My device and fleetdm.com/better changes: No changes
- [x] Usage statistics: No changes
- [x] Other reference documentation changes: No changes
- [x] First draft of test plan added
- [ ] Once shipped, requester has been notified
- [ ] Once shipped, dogfooding issue has been filed
Engineering
- [ ] Test plan is finalized
- [ ] Contributor API changes: TODO
- [ ] Feature guide changes: TODO
- [ ] Database schema migrations: TODO
- [ ] Load testing: TODO
- [ ] Pre-QA load test: TODO
- [ ] Load testing/osquery-perf improvements: TODO
ℹ️ Please read this issue carefully and understand it. Pay special attention to UI wireframes, especially "dev notes".
Risk assessment
- Requires testing in a hosted environment: TODO
- Requires load testing: TODO
- Risk level: Low / High TODO
- Risk description: TODO
Test plan
Make sure to go through the list and consider all events that might be related to this story, so we catch edge cases earlier.
Core flow
- [ ] Upload 2 Windows MDM profiles via batch set API (
POST /api/v1/fleet/mdm/profiles/batchwithteam_idset). Verify theedited_windows_profileactivity inGET /api/v1/fleet/activitiesincludes the profile names inadded_profiles. - [ ] Modify one of the uploaded profiles (change content) via batch set. Verify the activity includes the modified profile name in
modified_profiles. - [ ] Delete all profiles via empty batch set (send empty profiles array). Verify the activity includes the deleted profile names in
removed_profiles. - [ ] Verify individual profile operations (create via
POST /api/v1/fleet/mdm/windows/profiles, edit viaPUT /api/v1/fleet/mdm/windows/profiles/{uuid}, delete viaDELETE /api/v1/fleet/mdm/windows/profiles/{uuid}) still includeprofile_namein details (unchanged behavior). - [ ] Verify the activity feed in the UI renders the profile names for batch operations (not just the generic "edited configuration profiles via fleetctl" message).
- [ ] Verify GitOps mode: run
fleetctl generate-gitopsandfleetctl gitopswith Windows profiles and confirm the activity details include profile names.
Edge cases
- TODO
Supplemental testing
Testing notes
- The batch set endpoint is
POST /api/v1/fleet/mdm/profiles/batch(also accessible viafleetctl). - Windows MDM must be enabled and configured to test Windows profile operations.
- Compare activity details between batch set and individual operations to ensure consistency.
Confirmation
- [ ] Engineer: Added comment to user story confirming successful completion of test plan (include any special setup, test data, or configuration used during development/testing if applicable).
- [ ] QA: Added comment to user story confirming successful completion of test plan.
- [ ] QA: Determined whether this story needs Playwright automation.
- Needs automation: Yes / No
- If yes, filed a follow-up issue in the :help-qa project with status "Needs automation":
@getvictor We do this for every batch activity. GitOps users are supposed to use their repo history to track configuration changes.
I’ll close this story, as we don’t plan to change this. @rachaelshaw, let me know if I’m wrong, since this is more in the g-orchestration domain.
Profile names now seen, Like stars in cloud city's night. Audit trail complete.
Since this is a security issue, I'm reopening the ticket and assigning to @lukeheath
The industry best practice is to create a durable, discoverable risk-acceptance record rather than just closing the ticket. Because customers bear the risk, the decision has to be visible to the people exposed to it. Coordinated/responsible disclosure norms (ISO/IEC 29147 & 30111, CERT/CISA guidance) exist precisely because vendors hold information about risks that others bear. The expectation is disclosure proportional to severity, even for "won't-fix" issues. cc: @allenhouchins
Additional comments.
- The mitigation (GitOps history) only protects GitOps-managed teams. Customers using the batch API directly without GitOps get reduced attribution and should know that, because for them the compensating control doesn't exist.
Thanks @getvictor, and thanks for the disclosure-norms framing. I went through the code and want to set the disposition here.
The technical claim holds up. Batch set logs edited_windows_profile (and the macOS, declaration, and Android equivalents) with only the team fields and no profile name, while the single-profile created_/deleted_ activities include profile_name. So the gap is real, and as @marko-lisica said it applies to all batch activities, not just Windows.
A couple of things on severity, though. The activity isn't actually empty: it records the acting user, the timestamp, and the team. The "details": null in the example is a little misleading. We're missing the profile name and the diff, not the whole record. And nobody crosses a security boundary to do this. It's an authenticated admin using a permission they already have, so to me this is an audit completeness and attribution gap, not an access-control vulnerability. There's no privilege escalation, no unauthenticated path, and no data exposure.
So I'm not going to treat this as a security advisory or a coordinated-disclosure item. ISO/IEC 29147 and 30111 are about external reports coming into a vendor, and there's no exploitable vuln to disclose here. I'm writing the decision down on this ticket so it's durable and discoverable, which is the part of your point I do want to honor.
I still think we should fix it, just as ordinary risk reduction. Your last bullet is the convincing one for me: the GitOps history only covers GitOps-managed teams, so anyone driving the batch API directly gets no equivalent attribution. BatchSetMDMProfiles already returns MDMProfilesUpdates, so pulling the affected profile names into the activity payload should be contained, and it closes the inconsistency with the single-profile activities for everyone.
I'm keeping this engineering-initiated risk reduction rather than putting it on the security track. But it does need product to size and sequence, and to decide the shape of the added detail, since the activity schema is a customer-facing contract that feeds SIEMs. @rachaelshaw, this lands in g-orchestration. Could you size it and call the shape (added/modified/removed profile names vs. counts)? Glad to help with the spec.
From standup:
Noah: Agree it's weird to return a null value, if it's not hard to add let's jsut add it.
Victor: Then should we add it to all batch endpoints?
Luke: I don't think we want to expand scope beyond this endpoint. Let's fix this one, and anywhere else we return null for batch endpoints, let's update the API docs to note best practice usage involves version control.
TODO @rachaelshaw to define the API response for the profile details.
@georgekarrv , look like this issue was taken to BYOD by mistake. Pulling to p2pc. @melpike will take the API drafting. @lukeheath, @noahtalerman, this will not hit 4.91.0, please put 4.92.0 milestone if you want it prioritized to next release.
Transformed into a story. Original request: Fleet versions
- Discovered: fleet-v4.82.1
- Reproduced: fleet-v4.82.1
Actual behavior
Activities of type edited_windows_profile generated by batch set operations (e.g., uploading multiple profiles or deleting all profiles via empty batch set) have details: null in the activity log. Individual profile operations (create, delete, resend) correctly include the profile name in their details. This makes the audit trail incomplete for batch operations.
Example from activity log:
{"type": "edited_windows_profile", "details": null}
A malicious insider (IT admin) could use the batch set endpoint to modify a security policy (for example, weakening password requirements or disabling firewall enforcement) and the activity log would only show "Windows profiles were edited for Team Alpha" with no indication of WHICH profile was changed or WHAT changed.
The most relevant MITRE ATT&CK TTP:
T1562.001 Impair Defenses: Disable or Modify Tools
- The admin modifies an MDM security profile to weaken enforcement (e.g., reduce password complexity, disable SmartScreen)
- The batch endpoint obscures which profile was changed
To fix
When batch set operations log this activity, they should include additional details about which profiles were added, modified, or removed.
Steps to reproduce
These steps:
- [x] Have been confirmed to consistently lead to reproduction in multiple Fleet instances.
- [ ] Describe the workflow that led to the error, but have not yet been reproduced in multiple Fleet instances.
- Upload 2 profiles via batch set API
- Delete all profiles via empty batch set
- Check activity log:
GET /api/v1/fleet/activities - Observe:
edited_windows_profileactivities from batch set havedetails: null - Compare: individual create/delete operations have profile names in details