Hi,
I want to export from database the list of unscored rules for a specific scan compliance.
How can I do that by sql query?
Hi,
I want to export from database the list of unscored rules for a specific scan compliance.
How can I do that by sql query?
This could be a good starting point for you:
select dp.policy_id, dp.title as "Policy title",
dp.description, dpr.title as "Rule title",
dpr.severity
from dim_policy dp
join dim_policy_rule dpr
using (policy_id)
where dpr.role = 'unscored'
and dp.policy_id = <insert ID here>
If there’s additional data you want to pull, you could look at the dim_policy and dim_policy_rule tables and see what fields are available.