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
I create the output as csv as follows: Invoke-PSRule -Module 'PSRule.Rules.Azure' -InputPath .\*.json -Baseline 'Azure.All' -OutputFormat Csv -OutputPath .\export.csv
For some rules the recommendation includes a new line, e.g.
Azure.Resource.UseTags
Azure.AKS.PoolScaleSet
Azure.AKS.UseRBAC
Azure.AKS.PoolScaleSet
This behavior results in malformed csv, see code below:
"Azure.Resource.UseTags","aks-workerpool-xxxx-vmss","Microsoft.Compute/virtualMachineScaleSets","Pass","Processed","Azure resources should be tagged using a standard convention.","Consider tagging resources using a standard convention. Identify mandatory and optional tags then tag all resources and resource groups using this standard.
Also consider using Azure Policy to enforce mandatory tags."
"Azure.AKS.UseRBAC","aks","Microsoft.ContainerService/managedClusters","Pass","Processed","Deploy AKS cluster with role-based access control (RBAC) enabled.","Azure AD integration with AKS provides granular access control for Kubernetes resources using RBAC.
RBAC is a deployment time configuration. Consider redeploying the AKS cluster with RBAC enabled."
This result in a malformed csv, see img below:
To Reproduce
Steps to reproduce the issue:
Run the following command `Invoke-PSRule-Module 'PSRule.Rules.Azure'-InputPath .\*.json -Baseline 'Azure.All'-OutputFormat Csv -OutputPath .\export.csv`
Expected behaviour
New lines should not result in a new line in csv.
Module in use and version:
Module: PSRule.Azure
Version: *v2.9.0'
Captured output from $PSVersionTable:
Name Value
---- -----
PSVersion 7.2.11
PSEdition Core
GitCommitId 7.2.11
OS Microsoft Windows 10.0.19044
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
Additional context
The text was updated successfully, but these errors were encountered:
mschwrdtnr
changed the title
csv output will result in wrong rows
csv output will result in wrong rows because of new lines
Sep 22, 2023
mschwrdtnr
changed the title
csv output will result in wrong rows because of new lines
csv output of recommendation will result in wrong rows because of new lines
Sep 22, 2023
mschwrdtnr
changed the title
csv output of recommendation will result in wrong rows because of new lines
bug: csv output of recommendation will result in wrong rows because of new lines
Sep 22, 2023
Description of the issue
I create the output as csv as follows:
Invoke-PSRule -Module 'PSRule.Rules.Azure' -InputPath .\*.json -Baseline 'Azure.All' -OutputFormat Csv -OutputPath .\export.csv
For some rules the recommendation includes a new line, e.g.
Azure.Resource.UseTags
Azure.AKS.PoolScaleSet
Azure.AKS.UseRBAC
Azure.AKS.PoolScaleSet
This behavior results in malformed csv, see code below:
This result in a malformed csv, see img below:
To Reproduce
Steps to reproduce the issue:
Expected behaviour
New lines should not result in a new line in csv.
Module in use and version:
Captured output from
$PSVersionTable
:Additional context
The text was updated successfully, but these errors were encountered: