Skip to content

New-CIPolicyRule cannot accept single files in user mode #3293

Open
@timbrigham-oc

Description

@timbrigham-oc

If attempting to create a new rule for a specific file in a folder (say one specific binary out of C:\Windows\system32, my specific use case) there is no ready way to inform New-CIPolicyRule that the -DriverFiles argument that will accept a list of raw file names, or a single raw file name needs to have the UserMode flag set.

For example:

New-CiPolicyRule -DriverFiles $createdFromDriverScan[1] -Level Publisher -Fallback Hash
will have UserMode set to true. 

The exact same file if passed directly to New-CIPolicyRule:

New-CiPolicyRule -DriverFiles "C:\Temp\helloWorld.ps1" -Level Publisher -Fallback Hash
will have UserMode set to false, with no way to edit it. 

I also looked into initializing a custom Microsoft.SecureBoot.UserConfig.DriverFile object so I could set this parameter myself, but there isn't an obvious way to do this.


Document Details

Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.

Metadata

Metadata

Assignees

Labels

area-configciIssues for configci moduledoc-bugFor Upwork freelance team categories/reporting.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions