Skip to content

Conversation

@TravisEz13
Copy link
Member

fixes #5485

  • Causes Restricted and AllSigned execution policies to no longer trust PSHome by default.
  • To prevent behavior changes to Unrestricted, the trust for PShome was added here.
  • Update the description of Unrestricted to indicate that it requires the shell (an existing requirement.)

@TravisEz13 TravisEz13 changed the base branch from 6.0.0 to master November 21, 2017 00:03
Copy link
Member

Choose a reason for hiding this comment

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

If the execution policy is unrestricted, then I think we don't need this check anymore.

Copy link
Member

@daxian-dbw daxian-dbw Nov 21, 2017

Choose a reason for hiding this comment

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

Chatted with Travis offline. This check is needed to bypass files downloaded from the internet to $PSHome\Module when it's Unrestricted.
Need to add a comment about this.

Copy link
Member

@daxian-dbw daxian-dbw Nov 21, 2017

Choose a reason for hiding this comment

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

Chatted with Travis offline. This check is needed to bypass files downloaded from the internet to $PSHome\Module when it's Unrestricted.
Need to add a comment about this.

@SteveL-MSFT
Copy link
Member

Can we add a test?

Copy link
Member

Choose a reason for hiding this comment

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

typo: should be $testData

Copy link
Member

Choose a reason for hiding this comment

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

Missing param block

Copy link
Member

Choose a reason for hiding this comment

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

change to use ShouldBeErrorId?

Copy link
Member Author

Choose a reason for hiding this comment

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

Sorry, I accidentally pushed an incomplete commit. I have updated the PR.

}

)
foreach($testScript in $testScripts) {
Copy link
Member Author

Choose a reason for hiding this comment

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

Note, $testScripts was not defined in this scope, so nothing was being run.

@TravisEz13
Copy link
Member Author

Note, issue #5559 was filed when adding tests due to an issue with the tests. I have marked the affected tests to be skipped.

error = $null
}
)
It "$TestTypePrefix Running <testScript> Script should throw '<error>'" -TestCases $skipTestData -Skip {}
Copy link
Member

Choose a reason for hiding this comment

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

Should this be Pending and not Skipped?

@TravisEz13 TravisEz13 added this to the 6.0.0-GA milestone Nov 28, 2017
@daxian-dbw daxian-dbw merged commit f67844e into PowerShell:master Nov 29, 2017
@TravisEz13 TravisEz13 deleted the fix_allSigned branch November 29, 2017 01:56
TravisEz13 added a commit to TravisEz13/PowerShell that referenced this pull request Nov 30, 2017
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 this pull request may close these issues.

unsigned modules should not load with AllSigned policy

3 participants