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
Test-ModuleManifest needs specific error messages #6683
Test-ModuleManifest : The module manifest 'foo.psd1' could not be processed because it is not a valid PowerShell module manifest file. Remove the elements that are not permitted: /path/to/foo.psd1
It's probably worth checking if all error scenarios have specific, helpful error messages.
Additionally, the behavior regarding requiring the extension to be specified may have changed compared to Windows PowerShell.
Environment data
PowerShell Core v6.0.2 on macOS 10.13.4
PowerShell Core v6.0.2 on Ubuntu 16.04.4 LTS
PowerShell Core v6.0.2 on Microsoft Windows 10 Pro (64-bit; Version 1709, OS Build: 16299.371)
// Cache the module's exported commands after importing it, or if the -Refresh flag is used on "Get-Module -List"
if((module!=null)&&!module.HadErrorsLoading)
{
AnalysisCache.CacheModuleExports(module,Context);
}
}
The problem is that, at least 3 years ago (per Blame), an engineer added a caching service to avoid re-loading modules that have already been seen in the same session. This caching service is vulnerable to attack, as explained by me and summarized in #6818
This issue has not had any activity in 6 months, if this is a bug please try to reproduce on the latest version of PowerShell and reopen a new issue and reference this issue if this is still a blocker for you.
microsoft-github-policy-service commented on Nov 16, 2023
This issue has not had any activity in 6 months, if this is a bug please try to reproduce on the latest version of PowerShell and reopen a new issue and reference this issue if this is still a blocker for you.
This issue has not had any activity in 6 months, if this is a bug please try to reproduce on the latest version of PowerShell and reopen a new issue and reference this issue if this is still a blocker for you.
microsoft-github-policy-service commented on Nov 23, 2023
Activity
Persistent13 commentedon Oct 2, 2018
Steve Lee (@SteveL-MSFT) Michael Klement (@mklement0) I'd like to tackle this if there is no prior work in progress.
SteveL-MSFT commentedon Oct 2, 2018
Dakota Clark (@Persistent13) consider it yours! Thanks!
jzabroski commentedon Dec 3, 2018
Dakota Clark (@Persistent13)
Just to repeat what I said in #6818 :
This block of code in the PowerShell engine needs to be removed or refactored before you can 100% eliminate any bugs in Test-ModuleManifest.
PowerShell/src/System.Management.Automation/engine/Modules/ModuleCmdletBase.cs
Lines 345 to 352 in 79f21b4
The problem is that, at least 3 years ago (per Blame), an engineer added a caching service to avoid re-loading modules that have already been seen in the same session. This caching service is vulnerable to attack, as explained by me and summarized in #6818
Persistent13 commentedon Dec 5, 2018
John Zabroski (@jzabroski) That's for bringing that to may attention! I'll see what I can do about it.
mklement0 commentedon Dec 5, 2018
Dakota Clark (@Persistent13): Please also note the updates to my initial post, which now indicate dependencies on other issues.
microsoft-github-policy-service commentedon Nov 16, 2023
This issue has not had any activity in 6 months, if this is a bug please try to reproduce on the latest version of PowerShell and reopen a new issue and reference this issue if this is still a blocker for you.
microsoft-github-policy-service commentedon Nov 16, 2023
This issue has not had any activity in 6 months, if this is a bug please try to reproduce on the latest version of PowerShell and reopen a new issue and reference this issue if this is still a blocker for you.
microsoft-github-policy-service commentedon Nov 16, 2023
This issue has not had any activity in 6 months, if this is a bug please try to reproduce on the latest version of PowerShell and reopen a new issue and reference this issue if this is still a blocker for you.
microsoft-github-policy-service commentedon Nov 23, 2023
This issue has been marked as "No Activity" as there has been no activity for 6 months. It has been closed for housekeeping purposes.