Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Export summary to CSV rendered null #486

Closed
vicperdana opened this issue Jun 12, 2020 · 1 comment · Fixed by #487
Closed

Export summary to CSV rendered null #486

vicperdana opened this issue Jun 12, 2020 · 1 comment · Fixed by #487
Assignees
Labels
bug Something isn't working
Milestone

Comments

@vicperdana
Copy link

vicperdana commented Jun 12, 2020

Description of the issue

When running the Invoke-PSRule command to output summary to a csv file, no result was exported apart from the headers.

To Reproduce

Steps to reproduce the issue:

Invoke-PSRule -InputPath .\*.json -Module PSRule.Rules.Azure -As Summary -OutputFormat Csv -OutputPath "resultsSummary.csv"

Expected behaviour

Expect to receive below output (albeit in CSV format) - this command was run to simulate the behavior with no outputformat defined.

Invoke-PSRule -InputPath .\*.json -Module PSRule.Rules.Azure -As Summary
RuleName                            Pass  Fail  Outcome
--------                            ----  ----  -------
Azure.Automation.EncryptVariables   2     0     Pass
Azure.Automation.WebHookExpiry      2     0     Pass
Azure.Resource.UseTags              39    40    Fail
Azure.ResourceGroup.Name            1     0     Pass
Azure.RBAC.UseGroups                0     1     Fail
Azure.RBAC.LimitOwner               0     1     Fail
Azure.RBAC.LimitMGDelegation        1     0     Pass
Azure.RBAC.CoAdministrator          1     0     Pass
Azure.RBAC.UseRGDelegation          0     1     Fail
Azure.SecurityCenter.Contact        0     1     Fail
Azure.SecurityCenter.Provisioning   0     1     Fail
Azure.Monitor.ServiceHealth         0     1     Fail

Error output

Capture any error messages and or verbose messages with -Verbose.

There's no error message received with Verbose


Module in use and version:

  • Module: PSRule
  • Version: 0.18.0

Captured output from $PSVersionTable:

Name                           Value
----                           -----
PSVersion                      5.1.18362.752
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.18362.752
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1

Additional context

N/A

@BernieWhite BernieWhite added the bug Something isn't working label Jun 13, 2020
@BernieWhite BernieWhite added this to the v0.19.0 milestone Jun 13, 2020
@BernieWhite
Copy link
Member

@vicperdana Thanks for reporting this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants