Prerequisites
Steps to reproduce
The AMSI logging is still being performed on Linux even though there are no AMSI modules installed.
As demonstrated in #21473 this can lead to excessive heap usage
Expected behavior
#!/usr/bin/env pwsh
$env:__PSDumpAMSILogContent='1'
$bytes = new-object byte[] -ArgumentList @(,200554320)
$random = new-object Random
$random.NextBytes($bytes)
Should not print anything
Actual behavior
#!/usr/bin/env pwsh
$env:__PSDumpAMSILogContent='1'
$bytes = new-object byte[] -ArgumentList @(,200554320)
$random = new-object Random
$random.NextBytes($bytes)
Prints the following log
=== Amsi notification report content ===
<System.Random>.NextBytes(<System.Byte[]>)
=== Amsi notification report success: False ===
Error details
No actual error other than incorrect behaviour
Environment data
Name Value
---- -----
PSVersion 7.4.2
PSEdition Core
GitCommitId 7.4.2
OS Debian GNU/Linux 11 (bullseye)
Platform Unix
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
Visuals
No response
Prerequisites
Steps to reproduce
The AMSI logging is still being performed on Linux even though there are no AMSI modules installed.
As demonstrated in #21473 this can lead to excessive heap usage
Expected behavior
Actual behavior
Error details
No actual error other than incorrect behaviourEnvironment data
Visuals
No response