Skip to content

__PSDumpAMSILogContent debug logging sent to stdout #21497

@rhubarb-geek-nz

Description

@rhubarb-geek-nz

Prerequisites

Steps to reproduce

When enabling AMSI debug logging the log is written to stdout, this mixes in with the success stream. It should be written to stderr.

Expected behavior

When $env:__PSDumpAMSILogContent='1' is set the extra logging should go to stderr

Actual behavior

When $env:__PSDumpAMSILogContent='1' is set the extra logging goes to stdout

Error details

no error other reported by system

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

=== Amsi notification report content ===
<System.Byte[]>.new(<2048>)
=== Amsi notification report success: False ===

Metadata

Metadata

Assignees

Labels

Issue-Code Cleanupthe issue is for cleaning up the code with no impact on functionalityWG-ReviewedA Working Group has reviewed this and made a recommendationWG-Securitysecurity related areas such as JEA

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions