Skip to content

Review PR to only show MeasureInfo with populated values for security concerns #9726

Closed

Description

Summary of the new feature/enhancement

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.

See #7104 (comment)

cc Paul Higinbotham (@PaulHigin)

Activity

  1. added
    Issue-Enhancement
    on May 24, 2019
  2. added
    Issue-Code Cleanup
    on May 24, 2019
  3. PaulHigin commented on May 28, 2019

    @PaulHigin
    Contributor

    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.

  4. iSazonov commented on Dec 15, 2019

    @iSazonov
    Collaborator

    Should we do anything with #7104 before 7.0 GA?

  5. adityapatwardhan commented on Jan 8, 2020

    @adityapatwardhan
    Member
  6. PaulHigin commented on Jan 8, 2020

    @PaulHigin
    Contributor

    Aditya Patwardhan (@adityapatwardhan) What PR needs to be reviewed?

  7. iSazonov commented on Jan 8, 2020

    @iSazonov
    Collaborator
  8. PaulHigin commented on Jan 8, 2020

    @PaulHigin
    Contributor

    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?

  9. vexx32 commented on Jan 8, 2020

    @vexx32
    Collaborator

    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.

  10. SteveL-MSFT commented on Jan 8, 2020

    @SteveL-MSFT
    MemberAuthor

    Since that PR has been reverted, it seems the original concern is no longer valid.

  11. vexx32 commented on Jan 8, 2020

    @vexx32
    Collaborator

    Did we decide that PR is no longer wanted? 😕

  12. iSazonov commented on Jan 9, 2020

    @iSazonov
    Collaborator

    Yes, the same question. The PR was reverted until security review will be done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Issue-Code CleanupIssue-EnhancementResolution-Answered

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions