turbot/net_insights

GitHub
Loading controls...

Control: DNS records must be present

Description

Domain Name System (DNS) is used to point any domain toward the IP address of the server. When you search for a domain, the DNS records searches for the IP address of the server and server the website. It is required to have valid records for your domain, so that it can be found when anyone searching for your domain.

Usage

Run the control in your terminal:

steampipe check net_insights.control.dns_parent_records_found

Snapshot and share results via Steampipe Cloud:

steampipe login
steampipe check --share net_insights.control.dns_parent_records_found

Plugins & Tables

Params

ArgsNameDefaultDescriptionVariable
$1domain_names
["github.com","microsoft.com"]
DNS domain names.

SQL

select
domain as resource,
case
when count(*) = 0 then 'alarm'
else 'ok'
end as status,
case
when count(*) = 0 then domain || ' DNS records not found.'
else domain || ' DNS records found.'
end as reason
from
net_dns_record
where
domain in (
select
jsonb_array_elements_text(to_jsonb($1 :: text [ ]))
)
group by
domain;