GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Restrict New-Object in NoLanguage mode under lock down #14139 by krishnayalavarthi · Pull Request #14140 · PowerShell/PowerShell

Conversation

@krishnayalavarthi

@krishnayalavarthi krishnayalavarthi commented Nov 19, 2020 •
edited by SteveL-MSFT
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

PR Summary

Restrict New-Object in NoLanguage mode under lock down #14139

PR Context

PR Checklist

  • PR has a meaningful title
    • Use the present tense and imperative mood when describing your changes
  • Summarized changes
  • Make sure all .h, .cpp, .cs, .ps1 and .psm1 files have the correct copyright header
  • This PR is ready to merge and is not Work in Progress.
    • If the PR is work in progress, please add the prefix WIP: or [ WIP ] to the beginning of the title (the WIP bot will keep its status check at Pending while the prefix is present) and remove the prefix when the PR is ready.
  • Breaking changes
    • None
    • OR
    • Experimental feature(s) needed
      • Experimental feature name(s):
  • User-facing changes
    • Not Applicable
    • OR
    • Documentation needed
      • Issue filed:
  • Testing - New and feature
    • N/A or can only be tested interactively
    • OR
    • Make sure you've added a new test if existing tests do not effectively test the code changed
  • Tooling
    • I have considered the user experience from a tooling perspective and don't believe tooling will be impacted.
    • OR
    • I have considered the user experience from a tooling perspective and enumerated concerns in the summary. This may include:
      • Impact on PowerShell Editor Services which is used in the PowerShell extension for VSCode (which runs in a different PS Host).
      • Impact on Completions (both in the console and in editors) - one of PowerShell's most powerful features.
      • Impact on PSScriptAnalyzer (which provides linting & formatting in the editor extensions).
      • Impact on EditorSyntax (which provides syntax highlighting with in VSCode, GitHub, and many other editors).

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Krishna Yalavarthi
Potential defense in depth fix
b86ba5b
@ghost ghost assigned Rob Holt (rjmholt) Nov 19, 2020
Krishna Yalavarthi
Indentation fix
9222840
@iSazonov
Ilya (iSazonov) requested review from Paul Higinbotham (PaulHigin) and Travis Plunk (TravisEz13) November 19, 2020 05:12
Krishna Yalavarthi added 2 commits November 18, 2020 21:29
Krishna Yalavarthi
SystemPolicy error fixed
84cf633
Krishna Yalavarthi
Indentation
664e647
@SteveL-MSFT Steve Lee (SteveL-MSFT) changed the title Possible exploitation of New-Object in NoLanguage mode #14139 Restrict New-Object in NoLanguage mode under lock down #14139 Nov 19, 2020
@rjmholt
Rob Holt (rjmholt) requested review from Steve Lee (SteveL-MSFT) and Dongbo Wang (daxian-dbw) November 19, 2020 19:12
@iSazonov Ilya (iSazonov) added the CL-General Indicates that a PR should be marked as a general cmdlet change in the Change Log label Nov 21, 2020
Krishna Yalavarthi
restricted language check performed
497164d
@ghost ghost added the Review - Needed The PR is being reviewed label Dec 2, 2020
@ghost

Deleted user (ghost) commented Dec 2, 2020

Copy link
Copy Markdown

This pull request has been automatically marked as Review Needed because it has been there has not been any activity for 7 days.
Maintainer, please provide feedback and/or mark it as Waiting on Author

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@krishnayalavarthi

krishnayalavarthi commented Dec 2, 2020

Copy link
Copy Markdown
Contributor Author

image

The test case passed on my local machine where as it failed in the CI.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Krishna Yalavarthi added 2 commits December 1, 2020 18:59
Krishna Yalavarthi
Indentation
48c887a
Krishna Yalavarthi
Indentation
1da8610
rjmholt
Rob Holt (rjmholt) reviewed Dec 3, 2020
View reviewed changes
Comment thread src/Microsoft.PowerShell.Commands.Utility/resources/NewObjectStrings.resx Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread src/Microsoft.PowerShell.Commands.Utility/commands/utility/New-Object.cs Resolved

Uh oh!

There was an error while loading. Please reload this page.

@rjmholt

Rob Holt (rjmholt) commented Dec 3, 2020

Copy link
Copy Markdown
Collaborator

The test case passed on my local machine where as it failed in the CI.

The screenshot you've showed there isn't CI failing or passing. Those tests are being skipped. I'm guessing it's a non-Windows CI machine?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ghost ghost removed the Review - Needed The PR is being reviewed label Dec 3, 2020
Krishna Yalavarthi added 5 commits December 3, 2020 11:42
Krishna Yalavarthi
Code reorg
4986598
Krishna Yalavarthi
code reorg
bc76b39
Krishna Yalavarthi
Indentation
46d8da9
Krishna Yalavarthi
indent
27134a0
Krishna Yalavarthi
Revert "indent"
d04617d
This reverts commit 27134a0.
rjmholt
Rob Holt (rjmholt) reviewed Dec 3, 2020
View reviewed changes
Comment thread src/Microsoft.PowerShell.Commands.Utility/commands/utility/New-Object.cs Resolved

Uh oh!

There was an error while loading. Please reload this page.

Krishna Yalavarthi added 3 commits December 3, 2020 15:38
Krishna Yalavarthi
condition changed
716b7b2
Krishna Yalavarthi
COmpilation corrected
707b703
Krishna Yalavarthi
lockdown policy error
a8b23b2
rjmholt
Rob Holt (rjmholt) approved these changes Dec 4, 2020
View reviewed changes
PaulHigin
Paul Higinbotham (PaulHigin) approved these changes Dec 8, 2020
View reviewed changes

@PaulHigin Paul Higinbotham (PaulHigin) left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@rjmholt
Rob Holt (rjmholt) merged commit b007952 into PowerShell:master Dec 8, 2020
@ghost

Deleted user (ghost) commented Dec 15, 2020

Copy link
Copy Markdown

🎉v7.2.0-preview.2 has been released which incorporates this pull request.:tada:

Handy links:

  • Release Notes
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@sdwheeler Sean Wheeler (sdwheeler) mentioned this pull request Jan 25, 2021
New-Object cmdlet disabled in NoLanguage and RestrictedLanguage modes when system lockdown is configured MicrosoftDocs/PowerShell-Docs#7169
Closed
@PaulHigin Paul Higinbotham (PaulHigin) mentioned this pull request Nov 11, 2021
Restrict New-Object in NoLanguage mode under lock down #14139
Closed
Thatgfsj (Thatgfsj) pushed a commit to Thatgfsj-contribs/PowerShell that referenced this pull request Aug 6, 2026
@krishnayalavarthi
Restrict New-Object in NoLanguage mode under lock down PowerShell#14139…
f16c489
… (PowerShell#14140)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@TravisEz13 Travis Plunk (TravisEz13) Awaiting requested review from TravisEz13
@daxian-dbw Dongbo Wang (daxian-dbw) Awaiting requested review from daxian-dbw
@SteveL-MSFT Steve Lee (SteveL-MSFT) Awaiting requested review from SteveL-MSFT
2 more reviewers
@rjmholt Rob Holt (rjmholt) rjmholt approved these changes
@PaulHigin Paul Higinbotham (PaulHigin) PaulHigin approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@rjmholt Rob Holt (rjmholt)

Labels

CL-General Indicates that a PR should be marked as a general cmdlet change in the Change Log

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@krishnayalavarthi @rjmholt @PaulHigin @iSazonov
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.