Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.
Sign upAdd fix for Start-Job initialization script in system lockdown #8284
+25
−1
Conversation
PaulHigin
requested a review
from
TravisEz13
Nov 15, 2018
PaulHigin
requested a review
from
mirichmo
as a
code owner
Nov 15, 2018
PaulHigin
removed the request for review
from
mirichmo
Nov 15, 2018
PaulHigin
assigned
adityapatwardhan
Nov 15, 2018
PaulHigin
added
OS-Windows
Area-Remoting
labels
Nov 15, 2018
iSazonov
added
the
CL-Engine
label
Nov 16, 2018
TravisEz13
changed the title
[Feature] Add fix for Start-Job initialization script in system lockdown
Add fix for Start-Job initialization script in system lockdown
Nov 16, 2018
TravisEz13
approved these changes
Nov 16, 2018
adityapatwardhan
approved these changes
Nov 19, 2018
This comment has been minimized.
This comment has been minimized.
|
@PaulHigin, could you push a commit with |
This comment has been minimized.
This comment has been minimized.
|
Restarted CI in appveyor to pickup the latest test fixes. |
This comment has been minimized.
This comment has been minimized.
|
@adityapatwardhan Can this be merged? |
adityapatwardhan
merged commit 6a388f0
into
PowerShell:master
Nov 26, 2018
7 checks passed
CodeFactor
No issues found.
Details
PowerShell-CI-linux
#PR-8284-20181119.01 succeeded
Details
PowerShell-CI-macos
#PR-8284-20181119.01 succeeded
Details
PowerShell-CI-spelling
#PR-8284-20181119.01 succeeded
Details
PowerShell-CI-windows
#PR-8284-20181119.01 succeeded
Details
continuous-integration/appveyor/pr
AppVeyor build succeeded
Details
license/cla
All CLA requirements met.
Details
PaulHigin
deleted the
PaulHigin:fix_startjob_initScript
branch
Nov 27, 2018
iSazonov
added a commit
to iSazonov/PowerShell
that referenced
this pull request
Nov 29, 2018
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
PaulHigin commentedNov 15, 2018
PR Summary
This is a Windows platform issue only.
When running remote initialization script, the script block is considered internal and marked as trusted. In system lock down mode, PowerShell runs in ConstrainedLanguage mode and won't allow a trusted script block to run in the default scope.
Fix is to mark the initialization script as untrusted external when system is locked down.
Repro:
Fix is to mark initialization script as untrusted "external origin" when system is in lock down mode, so that it can run in ConstrainedLanguage session scope.
PR Checklist
.h,.cpp,.cs,.ps1and.psm1files have the correct copyright headerWIP:to the beginning of the title and remove the prefix when the PR is ready.[feature]if the change is significant or affects feature tests