You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Review PR to only show MeasureInfo with populated values for security concerns #9726
The PR to improve MeasureInfo formatting to only display properties with values creates a new script block. This api needs to be reviewed to ensure it can't be used as a way to change the language mode in constrained environments.
Passing a string that is converted into a ScriptBlock is not acceptable, as this would allow script injection with privilege escalation on locked down systems. However, it is Ok to have the API take a ScriptBlock object (not string), because the script block is marked correctly with the right trust level at creation.
Ilya (@iSazonov) Can you summarize what the security concerns are? Is this related to a change in this PR, and if so which one? Or is there a general security concern in the code which may have always existed? If so what is the concern?
The PR (which has since been reverted due to the security concern) introduces a public API which allows creation of a scriptblock from a string value as part of the formatting API.
If I'm mistaken, please correct me, but I believe the concern is whether creating a scriptblock in such a manner would potentially create a way to bypass restricted language modes.
Activity
PaulHigin commentedon May 28, 2019
Steve Lee (@SteveL-MSFT) It looks like the ScriptBlock changes were reverted from the PR you reference (#7754).
Passing a string that is converted into a ScriptBlock is not acceptable, as this would allow script injection with privilege escalation on locked down systems. However, it is Ok to have the API take a ScriptBlock object (not string), because the script block is marked correctly with the right trust level at creation.
iSazonov commentedon Dec 15, 2019
Should we do anything with #7104 before 7.0 GA?
adityapatwardhan commentedon Jan 8, 2020
Paul Higinbotham (@PaulHigin) Travis Plunk (@TravisEz13) Please review for security
PaulHigin commentedon Jan 8, 2020
Aditya Patwardhan (@adityapatwardhan) What PR needs to be reviewed?
iSazonov commentedon Jan 8, 2020
Paul Higinbotham (@PaulHigin) Please see the request #7104 (comment)
PaulHigin commentedon Jan 8, 2020
Ilya (@iSazonov) Can you summarize what the security concerns are? Is this related to a change in this PR, and if so which one? Or is there a general security concern in the code which may have always existed? If so what is the concern?
vexx32 commentedon Jan 8, 2020
The PR (which has since been reverted due to the security concern) introduces a public API which allows creation of a scriptblock from a string value as part of the formatting API.
If I'm mistaken, please correct me, but I believe the concern is whether creating a scriptblock in such a manner would potentially create a way to bypass restricted language modes.
SteveL-MSFT commentedon Jan 8, 2020
Since that PR has been reverted, it seems the original concern is no longer valid.
vexx32 commentedon Jan 8, 2020
Did we decide that PR is no longer wanted? 😕
iSazonov commentedon Jan 9, 2020
Yes, the same question. The PR was reverted until security review will be done.