HTML
Monkey365 provides an internal module which provides methods to convert internal data to HTML format. Also, internal module adds additional support to Markdown syntax with Markdig.
The following example can be used to export all data to an HTML file.
$param = @{
Instance = 'Azure';
Collect = 'All';
PromptBehavior = 'SelectAccount';
AllSubscriptions = $true;
TenantID = '00000000-0000-0000-0000-000000000000';
ExportTo = 'HTML';
}
Invoke-Monkey365 @param
Customize HTML
A Monkey365 report uses JSON-like configuration objects to visualize data in a variety of ways. This approach makes it easy to modify and combine tables, style them, and make them interactive with buttons. You can use your favorite text editor in order to modify these configuration files.
HTML Configuration Files Location
All the table formats are stored within JSON rules and data is rendered with JQuery DataTables
. Basic table and table as list
are the available formats. Please, note that not all features of HTML tables are supported.
HTML Table examples
Table As List
Take for example the following code extracted from the azure-app-services-ad-managed-identity-missing.json Monkey365 rule.
{
"data": {
"properties": {
"name": "Application Name",
"kind": "Kind",
"location": "Location",
"properties.defaultHostName": "HostName",
"properties.httpsOnly": "Https Only",
"identity.principalId": "Principal ID",
"appConfig.properties.ftpsState": "SSL FTP",
"appConfig.properties.minTlsVersion": "TLS Version",
"appConfig.properties.siteAuthSettings.Enabled": "Site Auth Enabled"
},
"expandObject": null
},
"table": "asList",
"decorate": [
],
"emphasis": [
"Principal ID"
]
}
In the above example, this will result in the data being rendered in a single table formatted as list
.
Normal Table
In this example, the following code that was extracted from the azure-storage-accounts-https-traffic-enabled.json Monkey365 rule is used to render data for Storage accounts missing key rotation finding into a default table.
{
"data": {
"properties": {
"name": "Name",
"CreationTime": "Creation Time",
"location": "Location",
"supportsHttpsTrafficOnly": "Https Only"
},
"expandObject": null
},
"table": "Normal",
"decorate": [
],
"emphasis": [
]
}
Add Raw data button
Table elements can be configured to show raw data on Bootstrap Modal. In order to route for showing raw data with modals, the showModalButton
should be set to True
, as shown below:
{
"actions": {
"objectData": {
"expand": [
"name",
"location",
"ResourceGroupName",
"CreationTime",
"supportsHttpsTrafficOnly"
],
"limit": null
},
"showModalButton": "True"
}
}
Note This feature is only supported in tables formatted as a Normal
table.
Add direct link button
Table elements can be configured to add a direct link to the Azure console section associated with the finding in the report. In order to route for showing raw data with modals, the showGoToButton
should be set to True
along with the actions
, as shown below:
{
"actions": {
"objectData": {
"expand": [
"name",
"location",
"ResourceGroupName",
"CreationTime",
"supportsHttpsTrafficOnly"
],
"limit": null
},
"showGoToButton": "True",
"showModalButton": "True"
}
}
Note This feature is only supported in tables formatted as a Normal
table. Please, also note that since this feature is experimental, we welcome your feedback.