microsoftgraph / microsoftgraph/msgraph-metadata

Please further limit read access to some properties of the deviceHealthScript resource

Open
#734 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

ToTriage
Dominant language
XSLT
Stars
166
Forks
55
Avg merge
16h 12m
Merged PRs (30d)
14

Description

Hello,

We are creating an audit tool to identify risks in some Microsoft systems, including Intune. As part of that work, we are looking at auditing risks surrounding various resource types, including deviceHealthScript resources.

https://learn.microsoft.com/en-us/graph/api/resources/intune-devices-devicehealthscript?view=graph-rest-beta

The deviceHealthScript resource type includes these two properties:

  • detectionScriptContent
  • remediationScriptContent

Those properties' values are base64-encoded PowerShell scripts.

This is problematic because our experience has been that PowerShell scripts often contain sensitive material such as credentials. When we deploy our software to our customers, we ask them to create an Entra application and grant the application the least privilege required to read information relevant to how we identify risks. Our product is a SaaS product, so the customer's data winds up in our infrastructure.

We can of course control our data collection software to filter out the detectionScriptContent and remediationScriptContent field values before the data is sent to our SaaS instance. But we would prefer, if possible, to be able to select a least-privilege MS Graph app role that can list deviceHealthScript objects, but cannot read the detectionScriptContent and remediationScriptContent field values. We believe this would be the most effective change to limit the risks we ourselves are creating for our customers.

The two MS Graph app roles that enable reading deviceHealthScript resources are:

  • DeviceManagementConfiguration.Read.All
  • DeviceManagementConfiguration.ReadWrite.All

Perhaps a possible solution could be to add a new MS Graph app role called:

  • DeviceManagementConfiguration.ReadBasic.All

And then constrain access to reading property values on deviceHealthScript objects such that the detectionScriptContent and remediationScriptContent fields cannot be read when presenting a JWT with only that permission. This would function similarly to the existing User.ReadBasic.All MS Graph app role: https://learn.microsoft.com/en-us/graph/permissions-reference#userreadbasicall

Thank you for your consideration.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked deviceHealthScript resource documentation and Microsoft Graph permissions reference. Assess the proposed least-privilege app role and property-level access behavior for detectionScriptContent and remediationScriptContent. Done means the requested access restriction or an alternative is specified and documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, powershell
Domain
api, authorization, security
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.