Skip to content
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

FalsePositive due to quotation mark in parameters. #3165

Closed
maheshdalavi opened this issue Apr 13, 2023 · 1 comment · Fixed by #3167 or #3188
Closed

FalsePositive due to quotation mark in parameters. #3165

maheshdalavi opened this issue Apr 13, 2023 · 1 comment · Fixed by #3167 or #3188

Comments

@maheshdalavi
Copy link

Details of the scenario you tried and the problem that is occurring

  • Some values like: NotifyPolicyTipCustomText, NotifyEmailCustomText and Comment as Quotation marks.

  • I am getting a FalsePositive for Drift monitoring.

  • In M365Tenantconfig.PS1, Quotation Mark’s is added with ( Grave Accent character ).

  • Screenshot from M365Tenantconfig.PS1
    image

  • This value is replaced as \“DNF or Restricted\” in Localhost.mof file

  • Eventually, this results in FalsePositive in drift monitoring, Because this is replaced by “left/right double quotation marks” in DSC parsing.

Verbose logs showing the problem

Below are the screenshots from the Event viewer.

image

==============

image

Suggested solution to the issue

use of raw encoding for affected values. even single quotation mark or inverted comma can be problematic

The DSC configuration that is used to reproduce the issue (as detailed as possible)

# insert configuration here

The operating system the target node is running

Version of the DSC module that was used ('dev' if using current dev branch)

@NikCharlebois
Copy link
Collaborator

Just to confirm, we are only able to reproduce if the current value in the Compliance center is using these tilted double quotes. If the original message doesn't use them or if you manually update the config file to include the tilted quotes, then it works. We have code to ensure invalid tilted characters are removed at extraction because of various encoding issues we've had in the past.
https://github.com/microsoft/Microsoft365DSC/blob/Dev/Modules/Microsoft365DSC/Modules/EncodingHelpers/M365DSCStringEncoding.psm1#L31

NikCharlebois added a commit to NikCharlebois/Microsoft365DSC that referenced this issue Apr 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants