Hi,
I would like to have a report with the minimum information concerning the conformity of the policies with my assets.
with this request, I have just one problem. it displays several results on rule compliance.
Could you please help me ?
SELECT
ds.name,
dp.title,
da.ip_address,
da.host_name,
dos.description,
dp.category,
fapr.date_tested,
fap.rule_compliance
FROM fact_asset_policy_rule fapr
JOIN dim_policy dp on dp.policy_id = fapr.policy_id
JOIN fact_asset_policy fap on fap.asset_id = fapr.asset_id
JOIN dim_asset da on da.asset_id = fapr.asset_id
JOIN dim_site_asset dsa ON dsa.asset_id = da.asset_id
JOIN dim_site ds ON ds.site_id = dsa.site_id
JOIN dim_operating_system dos ON dos.operating_system_id = da.operating_system_id
GROUP BY ds.name, dp.title, da.ip_address, da.host_name, dos.description, dp.category, fapr.date_tested, fap.rule_compliance;
result example
|name|title|ip_address|host_name|description|category|date_tested|rule_compliance|
|_BR - Windows NonProd|CIS Microsoft Windows Server 2016 RTM (Release 1607) Level One - Member Server v1.2.0|ip_address|host_name|Microsoft Windows Server 2016 Standard Edition 1607|CIS|2020-10-26 00:41:04.444|0,173611111|
|_BR - Windows NonProd|CIS Microsoft Windows Server 2016 RTM (Release 1607) Level One - Member Server v1.2.0|ip_address|host_name|Microsoft Windows Server 2016 Standard Edition 1607|CIS|2020-10-26 00:41:04.444|0,186851211|
|_BR - Windows UAT-I|CIS Microsoft Windows Server 2016 RTM (Release 1607) Level One - Member Server v1.2.0|ip_address|host_name|Microsoft Windows Server 2016 Standard Edition 1607|CIS|2020-10-26 00:41:04.444|0,173611111|
|_BR - Windows UAT-I|CIS Microsoft Windows Server 2016 RTM (Release 1607) Level One - Member Server v1.2.0|ip_address|host_name|Microsoft Windows Server 2016 Standard Edition 1607|CIS|2020-10-26 00:41:04.444|0,186851211|
end